Skip to content

Commit

Permalink
Merge pull request #2 from gsitaram/hipstdpar
Browse files Browse the repository at this point in the history
Change definition names to be more specific to AMD GPUs
  • Loading branch information
gsitaram authored Jun 20, 2024
2 parents 6bd658c + 7e5c410 commit cf2e1b3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/std-data/model.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ register_flag_optional(USE_ONEDPL
This requires the DPC++ compiler (other SYCL compilers are untested), required SYCL flags are added automatically."
"OFF")

register_flag_optional(CLANG_OFFLOAD
register_flag_optional(AMDGPU_TARGET_OFFLOAD
"Enable offloading support (via the non-standard `-stdpar`) for
Clang/LLVM. The values are AMDGPU processors (https://www.llvm.org/docs/AMDGPUUsage.html#processors)
which will be passed in via `--offload-arch=` argument.
Expand Down Expand Up @@ -65,13 +65,13 @@ macro(setup)
register_definitions(USE_ONEDPL)
register_link_library(oneDPL)
endif ()
if (CLANG_OFFLOAD)
set(CLANG_FLAGS --hipstdpar --offload-arch=${CLANG_OFFLOAD})
if (NOT CLANG_OFFLOAD MATCHES "^gfx9")
list(APPEND CLANG_FLAGS --hipstdpar-interpose-alloc)
if (AMDGPU_TARGET_OFFLOAD)
set(AMDGPU_TARGET_OFFLOAD_FLAGS --hipstdpar --offload-arch=${AMDGPU_TARGET_OFFLOAD})
if (NOT AMDGPU_TARGET_OFFLOAD MATCHES "^gfx9")
list(APPEND AMDGPU_TARGET_OFFLOAD_FLAGS --hipstdpar-interpose-alloc)
endif ()

register_append_cxx_flags(ANY ${CLANG_FLAGS})
register_append_cxx_flags(ANY ${AMDGPU_TARGET_OFFLOAD_FLAGS})
register_append_link_flags(--hipstdpar)
endif ()
endmacro()
12 changes: 6 additions & 6 deletions src/std-indices/model.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ register_flag_optional(USE_ONEDPL
This requires the DPC++ compiler (other SYCL compilers are untested), required SYCL flags are added automatically."
"OFF")

register_flag_optional(CLANG_OFFLOAD
register_flag_optional(AMDGPU_TARGET_OFFLOAD
"Enable offloading support (via the non-standard `-stdpar`) for
Clang/LLVM. The values are AMDGPU processors (https://www.llvm.org/docs/AMDGPUUsage.html#processors)
which will be passed in via `--offload-arch=` argument.
Expand Down Expand Up @@ -66,13 +66,13 @@ macro(setup)
register_definitions(USE_ONEDPL)
register_link_library(oneDPL)
endif ()
if (CLANG_OFFLOAD)
set(CLANG_FLAGS --hipstdpar --offload-arch=${CLANG_OFFLOAD})
if (NOT CLANG_OFFLOAD MATCHES "^gfx9")
list(APPEND CLANG_FLAGS --hipstdpar-interpose-alloc)
if (AMDGPU_TARGET_OFFLOAD)
set(AMDGPU_TARGET_OFFLOAD_FLAGS --hipstdpar --offload-arch=${AMDGPU_TARGET_OFFLOAD})
if (NOT AMDGPU_TARGET_OFFLOAD MATCHES "^gfx9")
list(APPEND AMDGPU_TARGET_OFFLOAD_FLAGS --hipstdpar-interpose-alloc)
endif ()

register_append_cxx_flags(ANY ${CLANG_FLAGS})
register_append_cxx_flags(ANY ${AMDGPU_TARGET_OFFLOAD_FLAGS})
register_append_link_flags(--hipstdpar)
endif ()
endmacro()

0 comments on commit cf2e1b3

Please sign in to comment.