Skip to content

Commit 3b6fb94

Browse files
committed
introduce nthreads_max for amdgpu
1 parent 7bdb7ca commit 3b6fb94

File tree

1 file changed

+17
-16
lines changed

1 file changed

+17
-16
lines changed

src/shared.jl

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,23 @@ Return an expression that evaluates to `true` if the indices generated by @paral
1515
This macro is not intended for explicit manual usage. Calls to it are automatically added by @parallel where required.
1616
"""
1717

18-
const SUPPORTED_NDIMS = [1, 2, 3]
19-
const NDIMS_NONE = 0
20-
const ERRMSG_KERNEL_UNSUPPORTED = "unsupported kernel statements in @parallel kernel definition: @parallel is only applicable to kernels that contain exclusively array assignments using macros from FiniteDifferences{1|2|3}D or from another compatible computation submodule. @parallel_indices supports any kind of statements in the kernels."
21-
const ERRMSG_CHECK_NDIMS = "ndims must be evaluatable at parse time (e.g. literal or constant) and has to be one of the following Integers: $(join(SUPPORTED_NDIMS,", "))"
22-
const ERRMSG_CHECK_MEMOPT = "memopt must be evaluatable at parse time (e.g. literal or constant) and has to be of type Bool."
23-
const PSNumber = PKNumber
24-
const LOOPSIZE = 16
25-
const LOOPDIM_NONE = 0
26-
const NTHREADS_MAX_LOOPOPT = 128
27-
const USE_SHMEMHALO_DEFAULT = true
28-
const USE_SHMEMHALO_1D_DEFAULT = true
29-
const USE_FULLRANGE_DEFAULT = (false, false, true)
30-
const FULLRANGE_THRESHOLD = 1
31-
const NOEXPR = :(begin end)
32-
const MOD_METADATA = :__metadata__ # gensym_world("__metadata__", @__MODULE__) # # TODO: name mangling should be used here later, or if there is any sense to leave it like that then at check whether it's available must be done before creating it
33-
const META_FUNCTION_PREFIX = string(gensym_world("META", @__MODULE__))
18+
const SUPPORTED_NDIMS = [1, 2, 3]
19+
const NDIMS_NONE = 0
20+
const ERRMSG_KERNEL_UNSUPPORTED = "unsupported kernel statements in @parallel kernel definition: @parallel is only applicable to kernels that contain exclusively array assignments using macros from FiniteDifferences{1|2|3}D or from another compatible computation submodule. @parallel_indices supports any kind of statements in the kernels."
21+
const ERRMSG_CHECK_NDIMS = "ndims must be evaluatable at parse time (e.g. literal or constant) and has to be one of the following Integers: $(join(SUPPORTED_NDIMS,", "))"
22+
const ERRMSG_CHECK_MEMOPT = "memopt must be evaluatable at parse time (e.g. literal or constant) and has to be of type Bool."
23+
const PSNumber = PKNumber
24+
const LOOPSIZE = 16
25+
const LOOPDIM_NONE = 0
26+
const NTHREADS_MAX_MEMOPT_CUDA = 128
27+
const NTHREADS_MAX_MEMOPT_AMDGPU = 256
28+
const USE_SHMEMHALO_DEFAULT = true
29+
const USE_SHMEMHALO_1D_DEFAULT = true
30+
const USE_FULLRANGE_DEFAULT = (false, false, true)
31+
const FULLRANGE_THRESHOLD = 1
32+
const NOEXPR = :(begin end)
33+
const MOD_METADATA = :__metadata__ # gensym_world("__metadata__", @__MODULE__) # # TODO: name mangling should be used here later, or if there is any sense to leave it like that then at check whether it's available must be done before creating it
34+
const META_FUNCTION_PREFIX = string(gensym_world("META", @__MODULE__))
3435

3536

3637
## FUNCTIONS TO DEAL WITH KERNEL DEFINITIONS

0 commit comments

Comments
 (0)