Files
TheRock/rocm-libraries/shared/stinkytofu/hardware/CMakeLists.txt
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

45 lines
2.1 KiB
CMake

# Copyright Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
set(GFX_SOURCES
GpuArchManager.cpp
InstDefDSL.cpp
)
# Add all STINKYTOFU_ARCHS cpp files to GFX_SOURCES (each in its own Gfx***/ folder)
foreach(arch ${STINKYTOFU_ARCHS_TO_BUILD})
list(APPEND GFX_SOURCES "${arch}/${arch}.cpp")
endforeach()
list(TRANSFORM GFX_SOURCES PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/src/gfx/")
##===----------------------------------------------------------------------===##
# GfxXXX.hpp, ArchHelper_includes.inc, GfxArchDefines.cpp, *_block.inc are generated
# by tablegen_inst_gen from Formats.def + Instructions.def (DEF_ARCH in Formats.def).
# gfxisa depends on instruction_generated (see parent CMakeLists.txt).
##===----------------------------------------------------------------------===##
file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/generated")
# GfxArchDefines.cpp and GfxLogicalMaps.cpp are produced by tablegen_inst_gen
list(APPEND GFX_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/generated/GfxArchDefines.cpp")
list(APPEND GFX_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/generated/GfxLogicalMaps.cpp")
set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/generated/GfxArchDefines.cpp" PROPERTIES GENERATED TRUE)
set_source_files_properties("${CMAKE_CURRENT_BINARY_DIR}/generated/GfxLogicalMaps.cpp" PROPERTIES GENERATED TRUE)
add_library(gfxisa STATIC ${GFX_SOURCES})
target_link_libraries(gfxisa PRIVATE stinkytofu-warnings)
target_include_directories(gfxisa PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}/../include
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include> # For generated files
${CMAKE_BINARY_DIR} # For GfxArchDefines.cpp #include "hardware/generated/*_block.inc"
)
# Export for stinkytofu: directory containing arch_headers so "arch_headers/ArchHelper_includes.inc" resolves
# (arch_headers/*.hpp and ArchHelper_includes.inc are generated by tablegen_inst_gen)
set(HW_ARCH_HEADERS_DIR "${CMAKE_CURRENT_BINARY_DIR}" PARENT_SCOPE)
# Note: gfxisa is only needed by tablegen.
# stinkytofu depends on tablegen_generated target which are generated by tablegen.