Skip to content

Commit

Permalink
Fix MacOS pjrt build for cuda/rocm/vulkan (#15644)
Browse files Browse the repository at this point in the history
Correct copy/paste typos from Commit #15280 where cpu cmake target name
was copied to vulkan, rcom, cuda in

integrations/pjrt/src/iree_pjrt/cuda/CMakeLists.txt
integrations/pjrt/src/iree_pjrt/rocm/CMakeLists.txt
integrations/pjrt/src/iree_pjrt/vulkan/CMakeLists.txt


cuda and rocm targets are currently not available for macOS, but Vulkan
can be run, and fails with pre-corrected version.
  • Loading branch information
astrotuna201 authored Nov 23, 2023
1 parent 518ed35 commit 1f6c162
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions integrations/pjrt/src/iree_pjrt/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ set_target_properties(iree_pjrt_cuda_dylib
# TODO: Find a better way to decide whether can link with undefined symbols.
if(NOT IREE_ENABLE_ASAN)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
target_link_options(iree_pjrt_cpu_dylib PRIVATE "-Wl,-undefined,error")
target_link_options(iree_pjrt_cuda_dylib PRIVATE "-Wl,-undefined,error")
else()
target_link_options(iree_pjrt_cpu_dylib PRIVATE "-Wl,--no-undefined")
target_link_options(iree_pjrt_cuda_dylib PRIVATE "-Wl,--no-undefined")
endif()
endif()
4 changes: 2 additions & 2 deletions integrations/pjrt/src/iree_pjrt/rocm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ set_target_properties(iree_pjrt_rocm_dylib
# TODO: Find a better way to decide whether can link with undefined symbols.
if(NOT IREE_ENABLE_ASAN)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
target_link_options(iree_pjrt_cpu_dylib PRIVATE "-Wl,-undefined,error")
target_link_options(iree_pjrt_rocm_dylib PRIVATE "-Wl,-undefined,error")
else()
target_link_options(iree_pjrt_cpu_dylib PRIVATE "-Wl,--no-undefined")
target_link_options(iree_pjrt_rocm_dylib PRIVATE "-Wl,--no-undefined")
endif()
endif()
4 changes: 2 additions & 2 deletions integrations/pjrt/src/iree_pjrt/vulkan/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ set_target_properties(iree_pjrt_vulkan_dylib
# TODO: Find a better way to decide whether can link with undefined symbols.
if(NOT IREE_ENABLE_ASAN)
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
target_link_options(iree_pjrt_cpu_dylib PRIVATE "-Wl,-undefined,error")
target_link_options(iree_pjrt_vulkan_dylib PRIVATE "-Wl,-undefined,error")
else()
target_link_options(iree_pjrt_cpu_dylib PRIVATE "-Wl,--no-undefined")
target_link_options(iree_pjrt_vulkan_dylib PRIVATE "-Wl,--no-undefined")
endif()
endif()

0 comments on commit 1f6c162

Please sign in to comment.