mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-02 04:31:25 +00:00
[rocm-libraries] ROCm/rocm-libraries#4797 (commit 1a30400)
[CK_TILE] Add CK Tile bwd weight profiler MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Motivation To compare old CK and CK Tile, we need to extend the current CK profiler to support running also CK Tile instance with the same API. In order to have the same instance coverage in CK Tile compared to the old CK, I've added code generation from old CK configurations to CK Tile instances using the CK Builder. ## Technical Details - The codegen python script for CK Tile fwd convs is extended to support also bwd weight and bwd data. - The generated instances are added to the CMake build (target `device_grouped_conv_bwd_weight_tile_instance`s). - A new profiler op (`grouped_conv_bwd_weight_tile`) has been added to the CK Profiler.
This commit is contained in:
committed by
assistant-librarian[bot]
parent
fc1e1a5155
commit
ae4e632c7d
@@ -2,19 +2,35 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if(GPU_TARGETS MATCHES "gfx9")
|
||||
# Generate instances using python script (empty to just generate empty instance list)
|
||||
if(NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/grouped_convolution_forward_tile_ndhwgc_fp32.inc)
|
||||
# Generate instances using python script if instance directories don't exist
|
||||
set(INSTANCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/instances)
|
||||
if(NOT EXISTS ${INSTANCES_DIR}/forward OR
|
||||
NOT EXISTS ${INSTANCES_DIR}/backward_weight OR
|
||||
NOT EXISTS ${INSTANCES_DIR}/backward_data)
|
||||
find_package(Python3 COMPONENTS Interpreter Development)
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/generate_instances.py --mode=tests
|
||||
RESULT_VARIABLE ret
|
||||
OUTPUT_VARIABLE output
|
||||
ERROR_VARIABLE error
|
||||
)
|
||||
|
||||
if(NOT ret EQUAL 0)
|
||||
message(FATAL_ERROR "Failed to generate instances. Return code: ${ret}\nOutput: ${output}\nError: ${error}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# Find cpp files and create lib for instances
|
||||
file(GLOB_RECURSE GROUPED_CONV_FWD_TILE "instances/*.cpp")
|
||||
file(GLOB_RECURSE GROUPED_CONV_FWD_TILE "instances/forward/*.cpp")
|
||||
add_instance_library(device_grouped_conv_fwd_tile_instances ${GROUPED_CONV_FWD_TILE})
|
||||
target_include_directories(device_grouped_conv_fwd_tile_instances PRIVATE
|
||||
"${PROJECT_SOURCE_DIR}/experimental/builder/test/utils")
|
||||
target_compile_options(device_grouped_conv_fwd_tile_instances PRIVATE -DCK_TILE_FLOAT_TO_BFLOAT16_DEFAULT=0)
|
||||
|
||||
file(GLOB_RECURSE GROUPED_CONV_BWD_WEIGHT_TILE "instances/backward_weight/*.cpp")
|
||||
add_instance_library(device_grouped_conv_bwd_weight_tile_instances ${GROUPED_CONV_BWD_WEIGHT_TILE})
|
||||
target_include_directories(device_grouped_conv_bwd_weight_tile_instances PRIVATE
|
||||
"${PROJECT_SOURCE_DIR}/experimental/builder/test/utils")
|
||||
|
||||
target_compile_options(device_grouped_conv_bwd_weight_tile_instances PRIVATE -DCK_TILE_FLOAT_TO_BFLOAT16_DEFAULT=0)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user