diff --git a/projects/hipblaslt/tensilelite/rocisa/CMakeLists.txt b/projects/hipblaslt/tensilelite/rocisa/CMakeLists.txt index b42e8a8f4611..c7cdfb969147 100644 --- a/projects/hipblaslt/tensilelite/rocisa/CMakeLists.txt +++ b/projects/hipblaslt/tensilelite/rocisa/CMakeLists.txt @@ -149,15 +149,15 @@ if(HIPBLASLT_BUNDLE_PYTHON_DEPS OR ROCISA_STANDALONE) target_link_libraries(_rocisa PUBLIC roc::origami) target_link_libraries(_rocisa PRIVATE hip::host stinkytofu::stinkytofu) - # rocisa<->stinkytofu conversion glue. These sources live in the stinkytofu - # source tree but are rocisa-side bindings (they include rocisa headers and - # define init_stinkytofu), so they compile into _rocisa, not libstinkytofu. - # rocisa owns them directly here rather than relying on stinkytofu to inject - # them, so the de-bundled (find_package) build links them too. - set(_stinkytofu_src_dir "${CMAKE_CURRENT_SOURCE_DIR}/../../../../shared/stinkytofu") + # rocisa<->stinkytofu conversion glue. These sources bridge rocisa types to + # stinkytofu IR and compile into _rocisa (they include both rocisa and + # stinkytofu headers, and define init_stinkytofu). target_sources(_rocisa PRIVATE - "${_stinkytofu_src_dir}/src/conversion/rocisa/AllHwMappings.cpp" - "${_stinkytofu_src_dir}/src/conversion/rocisa/ToStinkyTofuUtils.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/rocisa/src/stinkytofu/AllHwMappings.cpp" + "${CMAKE_CURRENT_SOURCE_DIR}/rocisa/src/stinkytofu/ToStinkyTofuUtils.cpp" + ) + target_include_directories(_rocisa PRIVATE + "${CMAKE_CURRENT_SOURCE_DIR}/rocisa/src/stinkytofu" ) if(_stinkytofu_from_subdirectory) @@ -217,7 +217,8 @@ if(HIPBLASLT_BUNDLE_PYTHON_DEPS OR ROCISA_STANDALONE) # which would leave the path empty and make the check scan the CWD. Point it # at the real stinkytofu source tree. if(NOT STINKYTOFU_ROOT_DIR) - cmake_path(ABSOLUTE_PATH _stinkytofu_src_dir NORMALIZE OUTPUT_VARIABLE STINKYTOFU_ROOT_DIR) + set(_st_sibling "${CMAKE_CURRENT_SOURCE_DIR}/../../../../shared/stinkytofu") + cmake_path(ABSOLUTE_PATH _st_sibling NORMALIZE OUTPUT_VARIABLE STINKYTOFU_ROOT_DIR) endif() configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/rocisa/_build_info.py.in" diff --git a/shared/stinkytofu/src/conversion/rocisa/AllHwMappings.cpp b/projects/hipblaslt/tensilelite/rocisa/rocisa/src/stinkytofu/AllHwMappings.cpp similarity index 100% rename from shared/stinkytofu/src/conversion/rocisa/AllHwMappings.cpp rename to projects/hipblaslt/tensilelite/rocisa/rocisa/src/stinkytofu/AllHwMappings.cpp diff --git a/shared/stinkytofu/src/conversion/rocisa/AllHwMappings.hpp b/projects/hipblaslt/tensilelite/rocisa/rocisa/src/stinkytofu/AllHwMappings.hpp similarity index 100% rename from shared/stinkytofu/src/conversion/rocisa/AllHwMappings.hpp rename to projects/hipblaslt/tensilelite/rocisa/rocisa/src/stinkytofu/AllHwMappings.hpp diff --git a/shared/stinkytofu/src/conversion/rocisa/Gfx1250RocisaArchInfo.hpp b/projects/hipblaslt/tensilelite/rocisa/rocisa/src/stinkytofu/Gfx1250RocisaArchInfo.hpp similarity index 100% rename from shared/stinkytofu/src/conversion/rocisa/Gfx1250RocisaArchInfo.hpp rename to projects/hipblaslt/tensilelite/rocisa/rocisa/src/stinkytofu/Gfx1250RocisaArchInfo.hpp diff --git a/shared/stinkytofu/src/conversion/rocisa/RocisaArchInfo.hpp b/projects/hipblaslt/tensilelite/rocisa/rocisa/src/stinkytofu/RocisaArchInfo.hpp similarity index 100% rename from shared/stinkytofu/src/conversion/rocisa/RocisaArchInfo.hpp rename to projects/hipblaslt/tensilelite/rocisa/rocisa/src/stinkytofu/RocisaArchInfo.hpp diff --git a/shared/stinkytofu/src/conversion/rocisa/ToStinkyTofuUtils.cpp b/projects/hipblaslt/tensilelite/rocisa/rocisa/src/stinkytofu/ToStinkyTofuUtils.cpp similarity index 100% rename from shared/stinkytofu/src/conversion/rocisa/ToStinkyTofuUtils.cpp rename to projects/hipblaslt/tensilelite/rocisa/rocisa/src/stinkytofu/ToStinkyTofuUtils.cpp diff --git a/shared/stinkytofu/CMakeLists.txt b/shared/stinkytofu/CMakeLists.txt index 76b8fa550cdf..c1922ff540ad 100644 --- a/shared/stinkytofu/CMakeLists.txt +++ b/shared/stinkytofu/CMakeLists.txt @@ -394,8 +394,6 @@ install(FILES ${TABLEGEN_OUTPUT_DIR}/hardware/gfxIsa.inc DESTINATION include/stinkytofu/hardware ) -# Per-arch rocisa conversion mappings, included by the rocisa conversion glue -# (src/conversion/rocisa/*ArchInfo.hpp) which rocisa compiles into _rocisa. install(DIRECTORY ${TABLEGEN_OUTPUT_DIR}/stinkytofu/ir/rocisa/ DESTINATION include/stinkytofu/stinkytofu/ir/rocisa FILES_MATCHING PATTERN "*.inc" diff --git a/shared/stinkytofu/tools/tablegen/CMakeLists.txt b/shared/stinkytofu/tools/tablegen/CMakeLists.txt index 3e176195ca37..377fb366d59d 100644 --- a/shared/stinkytofu/tools/tablegen/CMakeLists.txt +++ b/shared/stinkytofu/tools/tablegen/CMakeLists.txt @@ -3,7 +3,7 @@ set(SOURCES tablegen.cpp - GenRocisaHwMapping.cpp + GenRocisaHwMapping.cpp # TODO: remove when rocisa is replaced by stinkytofu IR GenLogicalToAsmMapping.cpp GenPatterns.cpp GenLogicalIR.cpp