Skip to content

Commit 4ad5bd7

Browse files
committed
Fix cmake
1 parent 28f1135 commit 4ad5bd7

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

library/src/tensor_operation_instance/gpu/CMakeLists.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ function(add_instance_library INSTANCE_NAME)
9999
message(DEBUG "removing gemm_ab_scale_f8 instance ${source} ")
100100
list(REMOVE_ITEM ARGN "${source}")
101101
endif()
102+
# Do not build gemm_blockscale_wp_f8 for any targets except gfx94, gfx95 and gfx12
103+
if(NOT (INST_TARGETS MATCHES "gfx942" OR INST_TARGETS MATCHES "gfx950" OR INST_TARGETS MATCHES "gfx12") AND (source_name MATCHES "gemm_blockscale_wp") AND (source_name MATCHES "_f8_f8_"))
104+
message(DEBUG "removing gemm_blockscale_wp_f8 instance ${source} ")
105+
list(REMOVE_ITEM ARGN "${source}")
106+
endif()
102107
# Only build tf32 instances for gfx942 & gfx950
103108
if(NOT (INST_TARGETS MATCHES "gfx942" OR INST_TARGETS MATCHES "gfx950") AND source_name MATCHES "_tf32_")
104109
message(DEBUG "removing tf32 instance ${source} ")
@@ -315,6 +320,10 @@ FOREACH(subdir_path ${dir_list})
315320
message(DEBUG "Found gemm_universal_preshuffle_f8 instances, but gfx94/gfx95 not on the target list. Skipping.")
316321
set(add_inst 0)
317322
endif()
323+
if(("${cmake_instance}" MATCHES "gemm_blockscale_wp" AND "${cmake_instance}" MATCHES "_f8_" ) AND (NOT INST_TARGETS MATCHES "gfx94|gfx95|gfx12") AND (NOT CK_USE_FP8_ON_UNSUPPORTED_ARCH))
324+
message(DEBUG "Found gemm_blockscale_wp_f8 instances, but gfx94/gfx95 not on the target list. Skipping.")
325+
set(add_inst 0)
326+
endif()
318327
if(("${cmake_instance}" MATCHES "gemm_xdl_universal_preshuffle" AND "${cmake_instance}" MATCHES "_f8_" ) AND (NOT INST_TARGETS MATCHES "gfx94|gfx95|gfx12") AND (NOT CK_USE_FP8_ON_UNSUPPORTED_ARCH))
319328
message(DEBUG "Found gemm_xdl_universal_preshuffle_f8_f8_bf16 instances, but gfx94/gfx95 not on the target list. Skipping.")
320329
set(add_inst 0)

0 commit comments

Comments
 (0)