composable_kernel icon indicating copy to clipboard operation
composable_kernel copied to clipboard

INSTANCES_ONLY=ON quietly override target list and cause issues

Open junliume opened this issue 1 year ago • 2 comments

composable_kernel/library/src/tensor_operation_instance/gpu/CMakeLists.txt at amd-develop · ROCm/composable_kernel (github.com)

Do not build mha instances if gfx94 targets are not on the target list

However, if one uses:

CXX=/opt/rocm/bin/amdclang++ cmake -DGPU_TARGETS="gfx1100" -DCMAKE_PREFIX_PATH=/opt/rocm -DCMAKE_BUILD_TYPE=Release -DINSTANCES_ONLY=ON ..

-DINSTANCES_ONLY=ON is overriding the target list to default

Should we revisit the behavior of INSTANCES_ONLY=ON? This is not the first time when CK tries to differentiate between GPU_TARGETS while INSTANCES_ONLY=ON gives us uninformed surprises.

junliume avatar Aug 10 '24 07:08 junliume

The INSTANCES_ONLY build argument had been re-purposed about a year ago from "do not build tests and examples" to "build the library for all supported targets". As such, it is not compatible with the "GPU_TARGETS" build argument anymore.

If you want to continue using it in its old role, we just need to create a new build argument that would provide the current functionality of the INSTANCES_ONLY.

illsilin avatar Aug 12 '24 15:08 illsilin

As discussed with @illsilin these lists need to be updated

https://github.com/ROCm/composable_kernel/blob/ab60b390f892052cee5ccbd68464caecec6981d9/library/src/tensor_operation_instance/gpu/CMakeLists.txt#L83-L88

junliume avatar Aug 12 '24 18:08 junliume

The INSTANCES_ONLY build argument has been deprecated. The targets can be set explicitly by using -DGPU_ARCHS build argument. All the changes have been documented in the README file.

illsilin avatar Nov 07 '24 22:11 illsilin