Skip to content

Commit 1ca05a1

Browse files
[rocm-libraries] ROCm/rocm-libraries#6434 (commit 87aae5c)
Fix ck4inductor conv instance parsing for NumGroupsToMerge parameter (#6434) ## Summary - Add `num_groups_to_merge` field to `CKGroupedConvFwdOp` dataclass to match the new (#4273) `NumGroupsToMerge` template parameter added to `DeviceGroupedConvFwdMultipleABD_Xdl_CShuffle_V3` - Enable inductor tests by default in Jenkins CI ## Test plan - [x] Built wheel without patch: `test_gen_conv_instances` fails with `TypeError: takes from 47 to 50 positional arguments but 51 were given` - [x] Built wheel with patch: `test_gen_conv_instances` passes
1 parent cbfb3e2 commit 1ca05a1

3 files changed

Lines changed: 32 additions & 9 deletions

File tree

Jenkinsfile

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -915,13 +915,7 @@ def Build_CK(Map conf=[:]){
915915
cmake_build(conf)
916916
if ( params.RUN_INDUCTOR_TESTS && arch == "gfx90a" ){
917917
echo "Run inductor codegen tests"
918-
sh """
919-
python3 -m venv ${env.WORKSPACE}/projects/composablekernel
920-
. ${env.WORKSPACE}/projects/composablekernel/bin/activate
921-
python3 -m pip install pytest build setuptools setuptools_scm
922-
python3 -m pip install .
923-
python3 -m pytest python/test/test_gen_instances.py
924-
"""
918+
sh "projects/composablekernel/script/run_inductor_tests.sh"
925919
}
926920
// run performance tests, stash the logs, results will be processed on the master node
927921
dir("projects/composablekernel/script"){
@@ -1338,8 +1332,8 @@ pipeline {
13381332
description: "Generate a detailed time trace (default: OFF)")
13391333
booleanParam(
13401334
name: "RUN_INDUCTOR_TESTS",
1341-
defaultValue: false,
1342-
description: "Run inductor codegen tests (default: OFF)")
1335+
defaultValue: true,
1336+
description: "Run inductor codegen tests (default: ON)")
13431337
booleanParam(
13441338
name: "RUN_CODEGEN_TESTS",
13451339
defaultValue: true,

python/ck4inductor/grouped_conv_fwd/op.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ class CKGroupedConvFwdOp:
6767
b_compute_dtype: Optional[str] = None
6868

6969
direct_load: Optional[bool] = None
70+
num_groups_to_merge: Optional[int] = None
7071

7172
def name(self):
7273
# cpp alias for template instance

script/run_inductor_tests.sh

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
# Run inductor codegen tests
3+
# This script is called from Jenkinsfile to reduce pipeline bytecode size
4+
5+
set -e
6+
7+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
8+
CK_DIR="$(dirname "$SCRIPT_DIR")"
9+
VENV_DIR="${WORKSPACE:-/tmp}/ck-inductor-venv"
10+
export UV_CACHE_DIR="${WORKSPACE:-/tmp}/.uv-cache"
11+
12+
cd "$CK_DIR"
13+
14+
echo "Setting up Python virtual environment at $VENV_DIR"
15+
python3 -m venv "$VENV_DIR"
16+
. "$VENV_DIR/bin/activate"
17+
18+
echo "Installing uv for faster package installation"
19+
pip install uv
20+
21+
echo "Installing test dependencies"
22+
uv pip install pytest build setuptools setuptools_scm
23+
24+
echo "Installing ck4inductor package"
25+
uv pip install .
26+
27+
echo "Running inductor codegen tests"
28+
python3 -m pytest python/test/test_gen_instances.py -v

0 commit comments

Comments
 (0)