Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmake/FindHIP.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ if(UNIX AND NOT APPLE AND NOT CYGWIN)
set(HIP_RUNTIME_DEFINE "__HIP_PLATFORM_AMD__")
set(HIP_PLATFORM "hip-clang")
endif()
elseif(${HIP_PLATFORM} STREQUAL "spirv")
set(HIP_INCLUDE_DIRS "${HIP_ROOT_DIR}/include")
set(HIP_LIBRARIES "${HIP_ROOT_DIR}/lib/libCHIP.so")
set(HIP_RUNTIME_DEFINE "__HIP_PLATFORM_SPIRV__")
elseif(${HIP_PLATFORM} STREQUAL "nvidia")
find_package(CUDA)

Expand Down
3 changes: 3 additions & 0 deletions src/occa/internal/modes/hip/device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ namespace occa {
}

void device::setArchCompilerFlags(occa::json &kernelProps) {
#if defined(__HIP_PLATFORM_SPIRV__)
return; // SPIR-V is architecture-agnostic; no arch flag
#endif
const std::string hipccCompilerFlags = (
kernelProps.get<std::string>("hipcc_compiler_flags")
);
Expand Down