Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cmake] Build parameter consistent issue with composable_kernelConfig.cmake #1646

Open
junliume opened this issue Nov 7, 2024 · 1 comment
Assignees
Labels

Comments

@junliume
Copy link
Collaborator

junliume commented Nov 7, 2024

[Observations]:
when building CK for specific platforms such as gfx1100:

sudo CXX=/opt/rocm/bin/amdclang++ cmake -DCMAKE_PREFIX_PATH=/opt/rocm -DCMAKE_BUILD_TYPE=Release -DGPU_ARCHS="gfx1100" ..

naturally /opt/rocm/lib/cmake/composable_kernel/composable_kerneldevice_mha_operationsTargets.cmak is *NOT generated because the platform does not yet fully support MHA operations.

However, when we try to build other libraries which depends on CK, e.g. MIOpen, we will observe the following error:

CMake Error at /opt/rocm/lib/cmake/composable_kernel/composable_kernelConfig.cmake:24 (include):
  include could not find requested file:

    /opt/rocm/lib/cmake/composable_kernel/composable_kerneldevice_mha_operationsTargets.cmake
Call Stack (most recent call first):
  CMakeLists.txt:330 (find_package)

[Reproduce Steps]: listed above

[Analysis]:
when building CK for specific platforms such as gfx1100:

sudo CXX=/opt/rocm/bin/amdclang++ cmake -DCMAKE_PREFIX_PATH=/opt/rocm -DCMAKE_BUILD_TYPE=Release -DGPU_ARCHS="gfx1100" ..

this generated file build/composable_kernelConfig.cmake


set(_composable_kernel_supported_components device_other_operations device_gemm_operations device_conv_operations device_mha_operations device_contraction_operations device_reduction_operations utility)

foreach(_comp ${composable_kernel_FIND_COMPONENTS})
        if(NOT _comp IN_LIST _composable_kernel_supported_components)
                set(composable_kernel_FOUND False)
                set(composable_kernel_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
        endif()
        include("${CMAKE_CURRENT_LIST_DIR}/composable_kernel${_comp}Targets.cmake")
endforeach()

Apparently, the _composable_kernel_supported_components needs to be adjusted according to build parameters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants