|
25 | 25 | println(z,": default implementation of kernel_example:") |
26 | 26 | end |
27 | 27 |
|
| 28 | + |
28 | 29 | # specify platform-aware implementations |
29 | | - @platform aware function kernel({accelerator_count::(@atleast 1)}, |
30 | | - x,y,args...; z=1, kwargs...) |
| 30 | + @platform aware function kernel({accelerator_count::(@atleast 1)}, y, args...; z=1, kwargs...) |
31 | 31 | println(z,": kernel for 1 accelerators of unspecified kind") |
32 | 32 | end |
33 | 33 |
|
34 | 34 | @platform aware function kernel({accelerator_count::Tuple{AtLeast1,AtMostInf,C} #=(@atleast(1,C))=#, |
35 | 35 | accelerator_manufacturer::NVIDIA, |
36 | | - accelerator_api::(@api CUDA 3.0)}, |
37 | | - x::@atleast(1),y,args...; z=2, kwargs...) where C |
| 36 | + accelerator_api::(@api CUDA 6.0)},y,args...; z=2, kwargs...) where C |
38 | 37 | println(z,": kernel 1 for $C NVIDIA accelerators") |
39 | 38 | end |
40 | 39 |
|
41 | 40 | @platform aware function kernel({accelerator_count::Tuple{AtLeast1,AtMostInf,C}#=(@atleast(1,C))=#, |
42 | 41 | accelerator_manufacturer::NVIDIA, |
43 | | - accelerator_api::(@api CUDA 3.0)}, |
44 | | - x::@atleast(16),y,args...; z=2, kwargs...) where C |
| 42 | + accelerator_api::(@api CUDA 5.0)},y,args...; z=2, kwargs...) where C |
45 | 43 | println(z,": kernel 2 for $C NVIDIA accelerators") |
46 | 44 | end |
47 | 45 |
|
| 46 | + |
48 | 47 | @platform assumption some_cluster = {node_count::(@atleast 32), processor::IntelCore_i7_7500U} |
49 | 48 |
|
50 | 49 | @platform aware function kernel($some_cluster, x,y,args...; z=3, kwargs...) |
|
0 commit comments