Skip to content

Commit

Permalink
stop trying to use function
Browse files Browse the repository at this point in the history
  • Loading branch information
aarongreig committed Dec 5, 2023
1 parent 5517adb commit 021ec81
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion cmake/FindRocmAgentEnumerator.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# rocm_agent_enumerator is found.
#

find_program(ROCM_AGENT_ENUMERATOR NAMES rocm_agent_enumerator)
find_program(ROCM_AGENT_ENUMERATOR NAMES not_rocm_agent_enumerator)

if(ROCM_AGENT_ENUMERATOR)
set(ROCM_AGENT_ENUMERATOR_FOUND TRUE)
Expand Down
12 changes: 3 additions & 9 deletions test/conformance/device_code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
# See LICENSE.TXT
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

function(detect_amd_arch AMD_ARCH)
set(AMD_ARCH "${UR_AMD_ARCH}")

if("${AMD_ARCH}" STREQUAL "" AND "${TARGET_TRIPLES}" MATCHES "amd")
find_package(RocmAgentEnumerator)
if(NOT ROCM_AGENT_ENUMERATOR_FOUND)
message(FATAL_ERROR
Expand All @@ -28,14 +30,6 @@ function(detect_amd_arch AMD_ARCH)
"please specify which target to use by setting UR_AMD_ARCH.")
endif()
list(GET ROCM_AGENT_LIST 0 AMD_ARCH)
return(${AMD_ARCH})
endfunction()

set(AMD_ARCH "${UR_AMD_ARCH}")

if("${AMD_ARCH}" STREQUAL "" AND "${TARGET_TRIPLES}" MATCHES "amd")
detect_amd_arch(AMD_ARCH)
message(STATUS "AMD_ARCH: ${AMD_ARCH}")
endif()

macro(add_device_binary SOURCE_FILE)
Expand Down

0 comments on commit 021ec81

Please sign in to comment.