Merge commit 'c54ecd905b07849076069d56c284472230564568' into develop

This commit is contained in:
assistant-librarian[bot]
2025-11-11 20:14:02 +00:00
parent db12c41b56
commit ba43b54f9f
43 changed files with 126 additions and 11 deletions

View File

@@ -1,5 +1,23 @@
[Back to the main page](../README.md)
# Composable Kernel profiler
## Building Specific Profilers
To reduce build time, filter which operations to compile using CMake options:
```bash
# Build all grouped_gemm variants (grouped_gemm, grouped_gemm_fastgelu, grouped_gemm_tile_loop, etc.)
cmake -DCK_PROFILER_OP_FILTER="grouped_gemm" <other options> ..
# Build ONLY base grouped_gemm (excludes variants - use exact regex match with ^ and $)
cmake -DCK_PROFILER_OP_FILTER="^grouped_gemm$" <other options> ..
```
Both `CK_PROFILER_OP_FILTER` and `CK_PROFILER_INSTANCE_FILTER` accept regex patterns. Default builds all operations.
To find the complete list of operations, run the following command:
```bash
find profiler/src -name "profile_*.cpp" | sed 's|profiler/src/profile_||' | sed 's|.cpp||' | sort
```
## Profiler GEMM UNIVERSAL kernels
```bash
# arg1: tensor operation (gemm_universal: Universal GEMM)

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
current_year=$(date +%Y)
exit_code=0

View File

@@ -1,2 +1,5 @@
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
find . -name deps -prune -o -name build -prune -o -iname '*.h' -o -iname '*.hpp' -o -iname '*.cpp' -o -iname '*.h.in' -o -iname '*.hpp.in' -o -iname '*.cpp.in' -o -iname '*.cl' -o -iname '*.cuh' -o -iname '*.cu' -o -iname '*.inc' | grep -v 'build/' | grep -v 'include/rapidjson'| xargs -n 1 -P 16 -I{} -t sh -c 'clang-format-18 -i -style=file {}'
git status --porcelain | awk '$1 != "D" && (match($2, "\\.cpp|.hpp|.inc|include/rapidjson/")) {print $2}' | xargs -n 1 -P 16 -I{} -t sh -c 'clang-format-18 -i -style=file {}'

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
# exit when a command exits with non-zero status; also when an unbound variable is referenced
set -eu
# pipefail is supported by many shells, not supported by sh and dash

View File

@@ -1,5 +1,6 @@
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
# Copyright (c) 2024, Advanced Micro Devices, Inc. All rights reserved.
# Convert miopen driver command to ck Profiler
# Example: python3 ../script/convert_miopen_driver_to_profiler.py
# /opt/rocm/bin/MIOpenDriver conv -n 32 -c 64 -H 28 -W 28 -k 64 -y 3 -x 3

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
FILE=$1
for num in {0..255}

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python3
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
## Copyright © Advanced Micro Devices, Inc. or its affiliates.
## SPDX-License-Identifier: MIT
# This script generate list of files that are not referenced from any test (list in JSON format)
# Script only looks at not referenced files from three directories: include, library and profiler

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
"""

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
"""

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
"""

View File

@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
BIN=./bin/tile_example_gemm_weight_preshuffle

View File

@@ -1,3 +1,6 @@
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
rm *.ll *.s
BC_FILE=$1

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
run_and_check() {
"$@"
status=$?

View File

@@ -1,5 +1,5 @@
#!/bin/bash
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
# Get the directory where the script is located

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env python3
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
"""

View File

@@ -1,4 +1,7 @@
#!/usr/bin/env python3
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
import os
import io
import argparse

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
#
# in order to run this script you'd need the following python packages:

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
#
# in order to run this script you'd need the following python packages:

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
## GPU visibility
export HIP_VISIBLE_DEVICES=0

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
## GPU visibility
export HIP_VISIBLE_DEVICES=0

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
## GPU visibility
export HIP_VISIBLE_DEVICES=0
DRIVER="../build/bin/ckProfiler"

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
## GPU visibility
export HIP_VISIBLE_DEVICES=0

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
## GPU visibility
export HIP_VISIBLE_DEVICES=0

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
## GPU visibility
export HIP_VISIBLE_DEVICES=0

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
## GPU visibility
export HIP_VISIBLE_DEVICES=0

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
## GPU visibility
export HIP_VISIBLE_DEVICES=0

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
## GPU visibility
export HIP_VISIBLE_DEVICES=0

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
## GPU visibility
export HIP_VISIBLE_DEVICES=0
DRIVER="../build/bin/ckProfiler"

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
## GPU visibility
export HIP_VISIBLE_DEVICES=0

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
DRIVER="../build/bin/ckProfiler"
VERIFY="-v $1"
INIT=$2

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
DRIVER="../build/bin/ckProfiler"
VERIFY="-v $1"
INIT=$2

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
## GPU visibility
export HIP_VISIBLE_DEVICES=0

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
## GPU visibility
export HIP_VISIBLE_DEVICES=0

View File

@@ -1,3 +1,6 @@
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
import os
root_dir = os.getcwd()

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
# Copyright © Advanced Micro Devices, Inc., or its affiliates.
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
for file in $(git diff --cached --name-only --diff-filter=ACM | grep -E '\.(cpp|hpp|txt|inc)$'); do

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
# Copyright (c) 2025, Advanced Micro Devices, Inc. All rights reserved.
# -*- coding: utf-8 -*-

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
#
# in order to run this script you'd first need to build the ckProfiler executable in ../build/bin/
# you would also need to set up some environment variables in order to

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
#
# in order to run this script you'd first need to build the ckProfiler executable in ../build/bin/
# run the script as "./run_gemm_performance_tests.sh <verification> <tag for your test environment> <branch name> <node name> <arch>

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
#
# in order to run this script you'd first need to build the ckProfiler executable in ../build/bin/
# run the script as "./run_performance_tests.sh <verification> <tag for your test environment> <branch name> <node name>

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
set -e
COMPILERS_HASH_DIR=${COMPILERS_HASH_DIR:-"/tmp/.sccache"}
SCCACHE_EXTRAFILES=${SCCACHE_EXTRAFILES:-"${COMPILERS_HASH_DIR}/rocm_compilers_hash_file"}

View File

@@ -1,4 +1,7 @@
#!/usr/bin/env bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
# set -e

View File

@@ -1,4 +1,7 @@
#!/bin/bash
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
## The following will be used for CI

View File

@@ -1 +1,4 @@
# Copyright (c) Advanced Micro Devices, Inc., or its affiliates.
# SPDX-License-Identifier: MIT
pre-commit uninstall