Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
tsoc
spack-packages
Commits
b2881df5
Commit
b2881df5
authored
Feb 11, 2026
by
one
Browse files
Update gfx936 and gfx938 support for kokkos
parent
c9dcc243
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
repos/spack_repo/hygon/tsoc/packages/kokkos/package.py
repos/spack_repo/hygon/tsoc/packages/kokkos/package.py
+13
-1
No files found.
repos/spack_repo/hygon/tsoc/packages/kokkos/package.py
View file @
b2881df5
...
@@ -199,10 +199,15 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
...
@@ -199,10 +199,15 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
when
=
"+rocm"
,
when
=
"+rocm"
,
)
)
hygongpu_arch_list
=
[
"gfx936"
,
"gfx938"
,
]
amdgpu_arch_map
=
{
amdgpu_arch_map
=
{
"gfx936"
:
"amd_gfx90a"
,
"gfx938"
:
"amd_gfx942"
,
"gfx900"
:
"vega900"
,
"gfx900"
:
"vega900"
,
"gfx906"
:
"vega906"
,
"gfx906"
:
"vega906"
,
"gfx936"
:
"vega906"
,
"gfx908"
:
"vega908"
,
"gfx908"
:
"vega908"
,
"gfx90a"
:
"vega90A"
,
"gfx90a"
:
"vega90A"
,
"gfx940"
:
"amd_gfx940"
,
"gfx940"
:
"amd_gfx940"
,
...
@@ -397,6 +402,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
...
@@ -397,6 +402,7 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
if
kokkos_microarch_name
:
if
kokkos_microarch_name
:
spack_microarches
.
append
(
kokkos_microarch_name
)
spack_microarches
.
append
(
kokkos_microarch_name
)
hygon_offload_arch
=
None
if
spec
.
satisfies
(
"+rocm"
):
if
spec
.
satisfies
(
"+rocm"
):
amdgpu_target
=
spec
.
variants
[
"amdgpu_target"
].
value
amdgpu_target
=
spec
.
variants
[
"amdgpu_target"
].
value
if
amdgpu_target
!=
"none"
:
if
amdgpu_target
!=
"none"
:
...
@@ -405,6 +411,8 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
...
@@ -405,6 +411,8 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
spack_microarches
.
append
(
self
.
amdgpu_apu_arch_map
[
amdgpu_target
])
spack_microarches
.
append
(
self
.
amdgpu_apu_arch_map
[
amdgpu_target
])
else
:
else
:
spack_microarches
.
append
(
self
.
amdgpu_arch_map
[
amdgpu_target
])
spack_microarches
.
append
(
self
.
amdgpu_arch_map
[
amdgpu_target
])
if
amdgpu_target
in
self
.
hygongpu_arch_list
:
hygon_offload_arch
=
amdgpu_target
else
:
else
:
# Note that conflict declarations should prevent
# Note that conflict declarations should prevent
# choosing an unsupported AMD GPU target
# choosing an unsupported AMD GPU target
...
@@ -415,6 +423,10 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
...
@@ -415,6 +423,10 @@ class Kokkos(CMakePackage, CudaPackage, ROCmPackage):
for
arch
in
spack_microarches
:
for
arch
in
spack_microarches
:
options
.
append
(
self
.
define
(
"Kokkos_ARCH_"
+
arch
.
upper
(),
True
))
options
.
append
(
self
.
define
(
"Kokkos_ARCH_"
+
arch
.
upper
(),
True
))
if
hygon_offload_arch
:
offload_arch
=
"--offload-arch={0}"
.
format
(
hygon_offload_arch
)
options
.
append
(
self
.
define
(
"Kokkos_IMPL_AMDGPU_FLAGS"
,
offload_arch
))
options
.
append
(
self
.
define
(
"Kokkos_IMPL_AMDGPU_LINK"
,
offload_arch
))
self
.
append_args
(
"ENABLE"
,
self
.
devices_variants
.
keys
(),
options
)
self
.
append_args
(
"ENABLE"
,
self
.
devices_variants
.
keys
(),
options
)
self
.
append_args
(
"ENABLE"
,
self
.
options_variants
.
keys
(),
options
)
self
.
append_args
(
"ENABLE"
,
self
.
options_variants
.
keys
(),
options
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment