|
@@ -185,6 +185,8 @@ end
|
|
struct StarpuCodelet
|
|
struct StarpuCodelet
|
|
where_to_execute :: UInt32
|
|
where_to_execute :: UInt32
|
|
|
|
|
|
|
|
+ color :: UInt32
|
|
|
|
+
|
|
cpu_func :: String
|
|
cpu_func :: String
|
|
cuda_func :: String
|
|
cuda_func :: String
|
|
opencl_func :: String
|
|
opencl_func :: String
|
|
@@ -201,7 +203,8 @@ struct StarpuCodelet
|
|
opencl_func :: String = "",
|
|
opencl_func :: String = "",
|
|
modes :: Vector{StarpuDataAccessMode} = StarpuDataAccessMode[],
|
|
modes :: Vector{StarpuDataAccessMode} = StarpuDataAccessMode[],
|
|
perfmodel :: StarpuPerfmodel = StarpuPerfmodel(),
|
|
perfmodel :: StarpuPerfmodel = StarpuPerfmodel(),
|
|
- where_to_execute :: Union{Cvoid, UInt32} = nothing
|
|
|
|
|
|
+ where_to_execute :: Union{Cvoid, UInt32} = nothing,
|
|
|
|
+ color :: UInt32 = 0x00000000
|
|
)
|
|
)
|
|
|
|
|
|
if (length(modes) > STARPU_NMAXBUFS)
|
|
if (length(modes) > STARPU_NMAXBUFS)
|
|
@@ -217,7 +220,7 @@ struct StarpuCodelet
|
|
real_where = where_to_execute
|
|
real_where = where_to_execute
|
|
end
|
|
end
|
|
|
|
|
|
- output = new(real_where, cpu_func, cuda_func, opencl_func,modes, perfmodel, real_c_codelet_ptr)
|
|
|
|
|
|
+ output = new(real_where, color, cpu_func, cuda_func, opencl_func,modes, perfmodel, real_c_codelet_ptr)
|
|
|
|
|
|
starpu_c_codelet_update(output)
|
|
starpu_c_codelet_update(output)
|
|
|
|
|
|
@@ -858,7 +861,7 @@ end
|
|
Creates and submits an asynchronous task running cl Codelet function.
|
|
Creates and submits an asynchronous task running cl Codelet function.
|
|
Ex : @starpu_async_cl cl(handle1, handle2)
|
|
Ex : @starpu_async_cl cl(handle1, handle2)
|
|
"""
|
|
"""
|
|
-macro starpu_async_cl(expr,modes,cl_arg=[])
|
|
|
|
|
|
+macro starpu_async_cl(expr, modes, cl_arg=[], color ::UInt32=0x00000000)
|
|
|
|
|
|
if (!isa(expr, Expr) || expr.head != :call)
|
|
if (!isa(expr, Expr) || expr.head != :call)
|
|
error("Invalid task submit syntax")
|
|
error("Invalid task submit syntax")
|
|
@@ -877,7 +880,8 @@ macro starpu_async_cl(expr,modes,cl_arg=[])
|
|
#opencl_func="ocl_matrix_mult",
|
|
#opencl_func="ocl_matrix_mult",
|
|
### TODO: CORRECT !
|
|
### TODO: CORRECT !
|
|
modes = map((x -> starpu_modes(x)),modes.args),
|
|
modes = map((x -> starpu_modes(x)),modes.args),
|
|
- perfmodel = perfmodel
|
|
|
|
|
|
+ perfmodel = perfmodel,
|
|
|
|
+ color = color
|
|
)
|
|
)
|
|
handles = Expr(:vect, expr.args[2:end]...)
|
|
handles = Expr(:vect, expr.args[2:end]...)
|
|
#dump(handles)
|
|
#dump(handles)
|
|
@@ -1214,6 +1218,8 @@ mutable struct StarpuCodeletTranslator
|
|
|
|
|
|
where_to_execute :: UInt32
|
|
where_to_execute :: UInt32
|
|
|
|
|
|
|
|
+ color :: UInt32
|
|
|
|
+
|
|
cpu_func :: Ptr{Cvoid}
|
|
cpu_func :: Ptr{Cvoid}
|
|
cpu_func_name :: Cstring
|
|
cpu_func_name :: Cstring
|
|
|
|
|
|
@@ -1237,6 +1243,7 @@ mutable struct StarpuCodeletTranslator
|
|
end
|
|
end
|
|
|
|
|
|
output.where_to_execute = cl.where_to_execute
|
|
output.where_to_execute = cl.where_to_execute
|
|
|
|
+ output.color = cl.color
|
|
|
|
|
|
cpu_func_ptr = load_starpu_function_pointer(cl.cpu_func)
|
|
cpu_func_ptr = load_starpu_function_pointer(cl.cpu_func)
|
|
cuda_func_ptr = load_starpu_function_pointer(cl.cuda_func)
|
|
cuda_func_ptr = load_starpu_function_pointer(cl.cuda_func)
|