mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-02 04:31:25 +00:00
* Pass hdim to tile_example_fmha_fwd in fp8 tests
* Add WMMA support to fwd FMHA pipelines
* Tune tile sizes a bit for less spilling
fp16 256 is still quite slow
* Fix Q grad tile distribution for warp size = 32 and hdim >= 256
With AccDataType = float and warp size = 32, K0 becomes 0, K repeat is required to correcty distribute the tile.
* Use code based on BlockDropout in BlockDropoutBwd
* Fix split KV combine kernel for gfx12 (warp size 32) and make it more universal
* Fix LSE LDS tensor descriptors: kMaxSplits and kM0 were swapped, it worked on gfx9
because they both equal to 8 while on gfx12 they are 8 and 4;
* Fix Oacc LDS tensor descriptor: it was transposed even though its shape=[4 * kM0, kN1],
it worked on gfx9 because 4 * kM == kN1 == 32;
* Removing these hidden dependecies allows to support:
* any number of warps (power-of-2), not only 4;
* kN1 = 16, not only 32;
* any number of splits;
* Rename ids like o_acc_4 and Oacc4 to eliminate confusion: kNumWarps doesn't have to be 4 now
* Replace hard-coded kN1 in dispatch code with the requested tile size
* Add gfx12-specific tile sizes for split KV
* Pass GPU architecture to kernel generation scripts
This is still a temporary solution.
* Build and run FMHA CI tests for gfx12
* Fix issue after merging
* Fix bwd tile sizes
The current pipelines always read only one tile K and V tile, this
requires bk0 == bhdq and bk2 == bhdv (kK0 == kQKHeaddim and
kK2 == kVHeaddim).
* Use hardware f32->f8 on gfx12, remove v_perm
__builtin_amdgcn_perm is not needed because
__builtin_amdgcn_cvt_pk_fp8_f32 allows to specify which word (16 bit of
32-bit dword) is used to store results (two f8 values).
* Update changelog
* Add WMMA support to pagedkv
* Fix scripts after rebasing
* Support 16x16 (MFMA, WMMA) and 32x32 (MFMA) tiles in fwd and bwd BlockDropout
Add comments with dropout implementation details
Fix performance regression of fwd+dropout
* Remove some usage of type punning (reinterpret_cast with ref or ptr) in Philox;
* "scalarize" seed and offset, they may come either from kernel args or from device memory
(presumably loaded with vector loads).
These changes help the compiler to procude more optimal code and reduce register spilling.
Use WarpGemmDispatcher instead of explicit WarpGemmMfma... to get CWarpDstrEncoding
Use code based on BlockDropout in BlockDropoutBwd
Refactor BlockDropout (fwd)
Implement BlockDropout (fwd) for WMMA
Originally BlockDropout only supported 32x32 tiles (IsWG32 = true),
this version supports 16x16 tiles.
If MPerBlock > MWarp * 16, it can generate numbers for two 16x16 tiles, similarly
to BlockDropoutBwd.
Implement BlockDropoutBwd for WMMA
Remove MakeRandValLds* functions unused in BlockDropoutBwd
Remove unused Run overload from BlockDropoutBwd
* Fix regression with philox seed and offset when they exceed 32-bit int
__builtin_amdgcn_readfirstlane works with 32-bit values, seed and offset
are 64-bit so they get truncated.
* Fix names after cherry-picking
* Fix selection of a fallback tile based on bm0
The assumption that the largest bm0 == 128 is not always true for
current fp32 tiles.
* Do not use filters related to qr_async_trload
They disable tiles/pipelines which are valid for gfx12.
* Use different dstr encoding when C is transposed
* Do not call GetQKBlockGemm (and hence WarpGemmDispatcher) in host code
Some WarpGemmDispatcher instantiations are defined only
for specific archs and undefined on host.
Calculations related to sched barriers are moved from Pipeline's public
fields into pipeline's operator().
* Fix incorrect name WarpGemmMfmaFp8Fp8F32M32N32K16SwizzleBTransposedCDistribution
Correct name is WarpGemmMfmaFp8Fp8F32M32N32K32SwizzleBTransposedCDistribution
because it's 32x32x16 with IterateK = 2 so K = 32, also all tiles used
in codegen scripts are 32, 32, 32.
* Generalize usages of WarpGemmDispatcher for MFMA and WMMA
WarpGemmMfmaFp8Fp8F32M32N32K32SwizzleBTransposedCDistribution is still
used explicitly becaus of swizzle factor = 4.
* Mark has_load_tr as maybe_unused
There are no transpose loading for RDNA.
* Remove CK_TILE_USE_MFMA/WMMA from fmha-related code
* Detect BlockSize on host based on warp size of the current device
If kBlockSize == kNumWarps * get_warp_size(), the kernel is launched with
kBlockSize / 2 because on host get_warp_size() == 64 always.
* Fix calculation of grid size for combine kernel with warp size = 32
* Add missing includes and header
* Support multiple archs in one binary for fwd
* Support multiple archs in one binary for fwd_splitkv, fwd_appendkv, pagedkv_prefill
* Support multiple archs in one binary for bwd
* trload kernels are compiled only for gfx950;
* instances with padding are checked after instances without padding so
they can be used as fallbacks (similarly to fwd);
* Extract common code from register_traits
* Revert "Fix regression with philox seed and offset when they exceed 32-bit int"
To simplify merging , the proper fix is in develop already.
* Support new numerical d paddings in trait ordering checks
* Build fp32 tests only on gfx9
* Do not use hardcoded M0 = 64 for dot bwd kernel
* Use textwrap.indent from standard library
* Make fp8 pipelines on gfx12 consistent with gfx9
* Update tests for current pipelines
* Make ninja check more responsive in CI
ninja buffers output so this job looks hanging.
* Support fp8fp32 by limiting O vector size
The fp32 output type requires storing 8 * sizeof(float) = 32 bytes,
which is not implemented (here 8 is the number of C values per lane for
v_wmma_f32_16x16x16...).
* Remove unused cmake options
* Unify including amd_buffer_addressing.hpp/_builtins.hpp
* Temporarily use amd_buffer_addressing.hpp on >=gfx10
amd_buffer_addressing_builtins.hpp uses inline asm for loads/stores
which is not compatible with >=gfx10:
* 1 scalar for exec masks instead of 2,
* gfx12 uses different instruction names etc.
* Update asm in bf16 conversions to work with warp 32
* Do not generate splitkv/appendkv with vlayout=col for consistency with fwd
* Add arch tags to kernels/host funcs, compile for each arch separately
* Add kM0 to fmha_bwd_dot_do_o kernel name to match filename
* Add workaround for miscompilation of bwd with padded hdim
SWDEV-559729: v_wmma instructions can be incorrectly placed in divergent
branches used to store padded tensors (when some lanes are inactive due
to padding). Inline asm with dummy dependencies on VGPRs of the tensors
prevents the compiler doing this.
* Fix add_gtest_executable for absolute paths
Some tests (like gemm_tile_engine) pass absolute paths to source files.
In CI the branch name is a part of the root dir, and if the branch name
contains "wmma", "xdl" etc., files can be incorrectly excluded.
* Run only hdim 128 smoke tests for fp8fp32
There are no instances for hdim 64 and 256.
* Format py with ruff to simplify merging develop
* Fix incorrect var name
* Codegen for gfx9,gfx950 when --targets is not specified
Aiter and Pytorch require changes for passing their targets to the codegen scripts.
With this temporary solution the files are generated but not all of them
have to be really built (depending on the used --offload-arch=).
* Combine arch-related values into ArchTrait
This more centralized approach removes duplication of various formatting templates.
* Try a workaround for Jenkins error "groovyjarjarasm.asm.MethodTooLargeException: Method too large"
Some code is extracted into a function.
246 lines
10 KiB
CMake
246 lines
10 KiB
CMake
set(INST_TARGETS ${SUPPORTED_GPU_TARGETS})
|
|
# Currently only gfx9 and gfx12 archs are supported by FMHA
|
|
list(FILTER INST_TARGETS INCLUDE REGEX "gfx9|gfx12")
|
|
if(NOT INST_TARGETS)
|
|
message(WARNING "Skipping Tile Engine FMHA compilation: No supported GPU targets (gfx9, gfx12) found in SUPPORTED_GPU_TARGETS: ${SUPPORTED_GPU_TARGETS}")
|
|
return()
|
|
endif()
|
|
|
|
# validate user-specified fmha_fwd API list
|
|
set(FMHA_FWD_KNOWN_APIS "fwd;fwd_splitkv;fwd_appendkv;pagedkv_prefill")
|
|
set(FMHA_FWD_ENABLE_APIS "fwd" CACHE STRING
|
|
"semicolon-separated list of APIs to generate (${FMHA_FWD_KNOWN_APIS}) & link, or \"all\".")
|
|
if(BUILD_TESTING)
|
|
# Build instances of all APIs for tests
|
|
message(DEBUG "Enabling all FWD APIs of CK Tile FMHA for because testing is enabled")
|
|
set(FMHA_FWD_ENABLE_APIS "all")
|
|
endif()
|
|
if(FMHA_FWD_ENABLE_APIS STREQUAL "all")
|
|
set(FMHA_FWD_ENABLE_APIS ${FMHA_FWD_KNOWN_APIS})
|
|
endif()
|
|
|
|
foreach(api ${FMHA_FWD_ENABLE_APIS})
|
|
if(NOT "${api}" IN_LIST FMHA_FWD_KNOWN_APIS)
|
|
message(FATAL_ERROR "${api} isn't a known api: ${FMHA_FWD_KNOWN_APIS}.")
|
|
endif()
|
|
endforeach()
|
|
|
|
# "fwd" is a must-have api for the fmha_fwd example, add it if not specified
|
|
if(NOT "fwd" IN_LIST FMHA_FWD_ENABLE_APIS)
|
|
list(PREPEND FMHA_FWD_ENABLE_APIS "fwd")
|
|
endif()
|
|
|
|
file(GLOB_RECURSE CODE_GEN_SCRIPTS CONFIGURE_DEPENDS
|
|
${CMAKE_CURRENT_LIST_DIR}/generate.py
|
|
${CMAKE_CURRENT_LIST_DIR}/codegen/*.py
|
|
)
|
|
# re-run execute_process `generate.py --list_blobs` if any of the codegen scripts change
|
|
set_directory_properties(PROPERTIES CMAKE_CONFIGURE_DEPENDS "${CODE_GEN_SCRIPTS}")
|
|
|
|
list(JOIN INST_TARGETS , FMHA_TARGETS_ARG)
|
|
|
|
string(REPLACE ";" "," FMHA_FWD_APIS "${FMHA_FWD_ENABLE_APIS}")
|
|
set(FMHA_FWD_CODE_GEN_COMMON_ARGS
|
|
${CMAKE_CURRENT_LIST_DIR}/generate.py
|
|
--targets ${FMHA_TARGETS_ARG}
|
|
--api ${FMHA_FWD_APIS}
|
|
--optdim 32,64,128,256
|
|
# --filter fmha_fwd...
|
|
)
|
|
set(FMHA_BWD_CODE_GEN_COMMON_ARGS
|
|
${CMAKE_CURRENT_LIST_DIR}/generate.py
|
|
--targets ${FMHA_TARGETS_ARG}
|
|
--api bwd
|
|
--receipt 3
|
|
--optdim 32,64,96,128,256
|
|
# --filter fmha_bwd_dot...@fmha_bwd_convert...@fmha_bwd...
|
|
)
|
|
|
|
# Reduce building time by disabling instances that are not currently used in the gtests
|
|
# TODO: Consider to use a special receipt for testing only, or even two receipts: a small subset of
|
|
# instances for quick CI runs and a larger subset for scheduled runs (the tests skip tests when
|
|
# there is no corresponding instance for parameters).
|
|
if(BUILD_TESTING)
|
|
# Filters are in the order of FMHA_FWD_KNOWN_APIS: fwd,fwd_splitkv_combine@fwd_splitkv,fwd_appendkv,pagedkv_prefill
|
|
list(APPEND FMHA_FWD_CODE_GEN_COMMON_ARGS --filter *_nlogits*_nskip*,*@*_nlogits*_nbias*,*,*_nlogits*_nskip*_pagedkv)
|
|
endif()
|
|
|
|
# generate a list of kernels, but not actually emit files at config sta
|
|
execute_process(
|
|
COMMAND ${Python3_EXECUTABLE} ${FMHA_FWD_CODE_GEN_COMMON_ARGS}
|
|
--list_blobs ${CMAKE_CURRENT_BINARY_DIR}/fwd_blob_list.txt
|
|
RESULT_VARIABLE ret
|
|
)
|
|
if(ret AND NOT ret EQUAL 0)
|
|
message(FATAL_ERROR "CK Tile FMHA FAILED to generate a list of FWD kernels via Python.")
|
|
endif()
|
|
|
|
execute_process(
|
|
COMMAND ${Python3_EXECUTABLE} ${FMHA_BWD_CODE_GEN_COMMON_ARGS}
|
|
--list_blobs ${CMAKE_CURRENT_BINARY_DIR}/bwd_blob_list.txt
|
|
RESULT_VARIABLE ret
|
|
)
|
|
if(ret AND NOT ret EQUAL 0)
|
|
message(FATAL_ERROR "CK Tile FMHA FAILED to generate a list of BWD kernels via Python.")
|
|
endif()
|
|
|
|
# NOTE: for cmake, the FMHA_FWD_GEN_BLOBS/FMHA_BWD_GEN_BLOBS files must be in the same directory
|
|
# as current cmake list, otherwise will not figure out the dependency properly
|
|
file(STRINGS ${CMAKE_CURRENT_BINARY_DIR}/fwd_blob_list.txt FMHA_FWD_GEN_BLOBS)
|
|
file(STRINGS ${CMAKE_CURRENT_BINARY_DIR}/bwd_blob_list.txt FMHA_BWD_GEN_BLOBS)
|
|
|
|
add_custom_command(
|
|
OUTPUT ${FMHA_FWD_GEN_BLOBS}
|
|
COMMAND ${Python3_EXECUTABLE} ${FMHA_FWD_CODE_GEN_COMMON_ARGS}
|
|
--output_dir ${CMAKE_CURRENT_BINARY_DIR}
|
|
DEPENDS ${CODE_GEN_SCRIPTS}
|
|
COMMENT "Generate CK Tile FMHA FWD kernels"
|
|
)
|
|
|
|
add_custom_command(
|
|
OUTPUT ${FMHA_BWD_GEN_BLOBS}
|
|
COMMAND ${Python3_EXECUTABLE} ${FMHA_BWD_CODE_GEN_COMMON_ARGS}
|
|
--output_dir ${CMAKE_CURRENT_BINARY_DIR}
|
|
DEPENDS ${CODE_GEN_SCRIPTS}
|
|
COMMENT "Generate CK Tile FMHA BWD kernels"
|
|
)
|
|
|
|
set(FMHA_FWD_INSTANCES "tile_fmha_fwd_instances")
|
|
set(FMHA_BWD_INSTANCES "tile_fmha_bwd_instances")
|
|
|
|
message(DEBUG "adding instances ${FMHA_FWD_INSTANCES}")
|
|
add_library(${FMHA_FWD_INSTANCES} OBJECT EXCLUDE_FROM_ALL)
|
|
target_include_directories(${FMHA_FWD_INSTANCES} PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
|
target_sources(${FMHA_FWD_INSTANCES} PRIVATE ${FMHA_FWD_GEN_BLOBS})
|
|
set_source_files_properties(${FMHA_FWD_GEN_BLOBS} PROPERTIES LANGUAGE HIP)
|
|
set_property(TARGET ${FMHA_FWD_INSTANCES} PROPERTY HIP_ARCHITECTURES ${INST_TARGETS})
|
|
|
|
message(DEBUG "adding instances ${FMHA_BWD_INSTANCES}")
|
|
add_library(${FMHA_BWD_INSTANCES} OBJECT EXCLUDE_FROM_ALL)
|
|
target_include_directories(${FMHA_BWD_INSTANCES} PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
|
target_sources(${FMHA_BWD_INSTANCES} PRIVATE ${FMHA_BWD_GEN_BLOBS})
|
|
set_source_files_properties(${FMHA_BWD_GEN_BLOBS} PROPERTIES LANGUAGE HIP)
|
|
set_property(TARGET ${FMHA_BWD_INSTANCES} PROPERTY HIP_ARCHITECTURES ${INST_TARGETS})
|
|
|
|
set(FMHA_FWD_PRIVATE_COMPILE_OPTIONS)
|
|
set(FMHA_BWD_PRIVATE_COMPILE_OPTIONS)
|
|
set(FMHA_FWD_INTERFACE_COMPILE_OPTIONS)
|
|
set(FMHA_BWD_INTERFACE_COMPILE_OPTIONS)
|
|
|
|
# NOTE: we turn off undefined-func-template to let source compile without explicit declare function specializations
|
|
# ... because they are auto-generated
|
|
list(APPEND FMHA_FWD_PRIVATE_COMPILE_OPTIONS -Wno-undefined-func-template)
|
|
list(APPEND FMHA_BWD_PRIVATE_COMPILE_OPTIONS -Wno-undefined-func-template)
|
|
|
|
# Allow comparing floating points directly in order to check sentinel values
|
|
list(APPEND FMHA_FWD_PRIVATE_COMPILE_OPTIONS -Wno-float-equal)
|
|
list(APPEND FMHA_BWD_PRIVATE_COMPILE_OPTIONS -Wno-float-equal)
|
|
|
|
# NOTE: this is dangerous since will change the whole kernel to flush denormals
|
|
# WIP with compiler team for an exp2 intrinsic..., then remove this
|
|
if(NOT DEFINED FMHA_FWD_FAST_EXP2)
|
|
set(FMHA_FWD_FAST_EXP2 ON)
|
|
endif()
|
|
|
|
if(FMHA_FWD_FAST_EXP2)
|
|
list(APPEND FMHA_FWD_PRIVATE_COMPILE_OPTIONS -DCK_TILE_FMHA_FWD_FAST_EXP2=1 -fgpu-flush-denormals-to-zero)
|
|
else()
|
|
list(APPEND FMHA_FWD_PRIVATE_COMPILE_OPTIONS -DCK_TILE_FMHA_FWD_FAST_EXP2=0)
|
|
endif()
|
|
list(APPEND FMHA_BWD_PRIVATE_COMPILE_OPTIONS -fgpu-flush-denormals-to-zero)
|
|
|
|
# conditionally enable call to the fwd_splitkv API in fmha_fwd example and tests
|
|
if("fwd_splitkv" IN_LIST FMHA_FWD_ENABLE_APIS)
|
|
list(APPEND FMHA_FWD_INTERFACE_COMPILE_OPTIONS -DCK_TILE_FMHA_FWD_SPLITKV_API=1)
|
|
else()
|
|
list(APPEND FMHA_FWD_INTERFACE_COMPILE_OPTIONS -DCK_TILE_FMHA_FWD_SPLITKV_API=0)
|
|
endif()
|
|
|
|
# conditionally enable call to the fwd_appendkv API in fmha_fwd example and tests
|
|
if("fwd_appendkv" IN_LIST FMHA_FWD_ENABLE_APIS)
|
|
list(APPEND FMHA_FWD_INTERFACE_COMPILE_OPTIONS -DCK_TILE_FMHA_FWD_APPENDKV_API=1)
|
|
else()
|
|
list(APPEND FMHA_FWD_INTERFACE_COMPILE_OPTIONS -DCK_TILE_FMHA_FWD_APPENDKV_API=0)
|
|
endif()
|
|
|
|
# conditionally enable call to the pagedkv_prefill API in fmha_fwd example and tests
|
|
if("pagedkv_prefill" IN_LIST FMHA_FWD_ENABLE_APIS)
|
|
list(APPEND FMHA_FWD_INTERFACE_COMPILE_OPTIONS -DCK_TILE_FMHA_FWD_PAGEDKV_API=1)
|
|
else()
|
|
list(APPEND FMHA_FWD_INTERFACE_COMPILE_OPTIONS -DCK_TILE_FMHA_FWD_PAGEDKV_API=0)
|
|
endif()
|
|
|
|
# conditionally specify the use of OCP_FP8
|
|
if(CK_USE_OCP_FP8)
|
|
list(APPEND FMHA_FWD_PRIVATE_COMPILE_OPTIONS -DCK_TILE_USE_OCP_FP8)
|
|
list(APPEND FMHA_FWD_INTERFACE_COMPILE_OPTIONS -DCK_TILE_USE_OCP_FP8)
|
|
endif()
|
|
|
|
# use RTN_ASM on float to bfloat16 conversion by default, align with FA upstream
|
|
list(APPEND FMHA_BWD_PRIVATE_COMPILE_OPTIONS -DCK_TILE_FLOAT_TO_BFLOAT16_DEFAULT=3)
|
|
list(APPEND FMHA_BWD_INTERFACE_COMPILE_OPTIONS -DCK_TILE_FLOAT_TO_BFLOAT16_DEFAULT=3)
|
|
|
|
target_compile_options(${FMHA_FWD_INSTANCES}
|
|
PRIVATE ${FMHA_FWD_PRIVATE_COMPILE_OPTIONS}
|
|
INTERFACE ${FMHA_FWD_INTERFACE_COMPILE_OPTIONS})
|
|
target_compile_options(${FMHA_BWD_INSTANCES}
|
|
PRIVATE ${FMHA_BWD_PRIVATE_COMPILE_OPTIONS}
|
|
INTERFACE ${FMHA_BWD_INTERFACE_COMPILE_OPTIONS})
|
|
|
|
set(EXAMPLE_FMHA_FWD "tile_example_fmha_fwd")
|
|
set(EXAMPLE_FMHA_BWD "tile_example_fmha_bwd")
|
|
|
|
message(DEBUG "adding example ${EXAMPLE_FMHA_FWD}")
|
|
# not using add_example_executable() to add this target, since we don't want this to be included in
|
|
# "make all/install/check"
|
|
add_executable(${EXAMPLE_FMHA_FWD} EXCLUDE_FROM_ALL example_fmha_fwd.cpp)
|
|
target_link_libraries(${EXAMPLE_FMHA_FWD} ${FMHA_FWD_INSTANCES})
|
|
target_include_directories(${EXAMPLE_FMHA_FWD} PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
message(DEBUG "adding example ${EXAMPLE_FMHA_BWD}")
|
|
# not using add_example_executable() to add this target, since we don't want this to be included in
|
|
# "make all/install/check"
|
|
add_executable(${EXAMPLE_FMHA_BWD} EXCLUDE_FROM_ALL example_fmha_bwd.cpp)
|
|
target_link_libraries(${EXAMPLE_FMHA_BWD} ${FMHA_BWD_INSTANCES})
|
|
target_include_directories(${EXAMPLE_FMHA_BWD} PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
|
|
|
# add fmha_fwd_v3 example
|
|
set(EXAMPLE_FMHA_FWD_V3 "tile_example_fmha_fwd_v3")
|
|
message(DEBUG "adding example ${EXAMPLE_FMHA_FWD_V3}")
|
|
|
|
add_executable(${EXAMPLE_FMHA_FWD_V3} EXCLUDE_FROM_ALL example_fmha_fwd_v3.cpp)
|
|
target_include_directories(${EXAMPLE_FMHA_FWD_V3} PRIVATE ${CMAKE_CURRENT_LIST_DIR})
|
|
file(GLOB FMHA_FWD_V3_INSTANCES CONFIGURE_DEPENDS
|
|
"${CMAKE_CURRENT_LIST_DIR}/instances/*.cpp"
|
|
)
|
|
target_sources(${EXAMPLE_FMHA_FWD_V3} PRIVATE
|
|
fmha_fwd_v3.cpp
|
|
${FMHA_FWD_V3_INSTANCES}
|
|
)
|
|
|
|
set(EXAMPLE_FMHA_FWD_V3_COMPILE_OPTIONS)
|
|
list(APPEND EXAMPLE_FMHA_FWD_V3_COMPILE_OPTIONS
|
|
-fgpu-flush-denormals-to-zero
|
|
-Wno-undefined-func-template
|
|
--save-temps
|
|
)
|
|
set(EXAMPLE_FMHA_FWD_V3_COMPILE_DEFINITIONS)
|
|
|
|
check_cxx_compiler_flag("-mllvm --amdgpu-disable-packed-fp32=1" HAS_DISABLE_PACKED_FP32)
|
|
if(HAS_DISABLE_PACKED_FP32)
|
|
list(APPEND EXAMPLE_FMHA_FWD_V3_COMPILE_OPTIONS
|
|
-mllvm --amdgpu-disable-packed-fp32=1
|
|
)
|
|
list(APPEND EXAMPLE_FMHA_FWD_V3_COMPILE_DEFINITIONS
|
|
-DCK_TILE_DISABLE_PACKED_FP32=1
|
|
)
|
|
endif()
|
|
|
|
target_compile_options(${EXAMPLE_FMHA_FWD_V3} PRIVATE ${EXAMPLE_FMHA_FWD_V3_COMPILE_OPTIONS})
|
|
target_compile_definitions(${EXAMPLE_FMHA_FWD_V3} PRIVATE ${EXAMPLE_FMHA_FWD_V3_COMPILE_DEFINITIONS})
|
|
# TODO: we have to turn off this global prop, otherwise the progress bar generated
|
|
# by cmake will print too many files, execvp: /bin/sh: Argument list too long
|
|
# however, this property may affect global
|
|
# TODO: consider codegen a makefile by us
|
|
set_property(GLOBAL PROPERTY RULE_MESSAGES OFF)
|