From 4dc5f52f57c4d1c93e0020933406bb061f9191df Mon Sep 17 00:00:00 2001 From: Illia Silin <98187287+illsilin@users.noreply.github.com> Date: Thu, 5 Feb 2026 17:06:57 -0800 Subject: [PATCH] [CK] a bunch of CI fixes. (#4361) ## Motivation Fixing some of the CK CI issues ## Technical Details fixing paths to dockerfiles and scripts; moving codegen tests to separate stage (collides with main build since you must call cmake from same folder but different options); fixing a couple of clang compilation issues with staging compiler; --- Jenkinsfile | 24 +++++++++++-------- cmake/gtest.cmake | 1 + ...blockwise_gemm_mx_pipeline_xdlops_base.hpp | 5 +++- .../src/enhanced_ninja_parser.py | 22 ++++++++--------- 4 files changed, 30 insertions(+), 22 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a5a2c6ca35..59d99c9f8d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -429,18 +429,18 @@ def buildDocker(install_prefix){ echo "Building Docker for ${image_name}" def dockerArgs = "--build-arg PREFIX=${install_prefix} --build-arg CK_SCCACHE='${env.CK_SCCACHE}' --build-arg compiler_version='${params.COMPILER_VERSION}' --build-arg compiler_commit='${params.COMPILER_COMMIT}' --build-arg ROCMVERSION='${params.ROCMVERSION}' " if(params.COMPILER_VERSION == "amd-staging" || params.COMPILER_VERSION == "amd-mainline" || params.COMPILER_COMMIT != ""){ - dockerArgs = dockerArgs + " --no-cache --build-arg BASE_DOCKER='${base_image_name}' -f Dockerfile.compiler . " + dockerArgs = dockerArgs + " --no-cache --build-arg BASE_DOCKER='${base_image_name}' -f projects/composablekernel/Dockerfile.compiler . " } else if(params.RUN_AITER_TESTS){ image_name = "${env.CK_DOCKERHUB_PRIVATE}:ck_aiter" - dockerArgs = dockerArgs + " --no-cache -f Dockerfile.aiter --build-arg AITER_BRANCH='${params.aiter_branch}' --build-arg CK_AITER_BRANCH='${params.ck_aiter_branch}' . " + dockerArgs = dockerArgs + " --no-cache -f projects/composablekernel/Dockerfile.aiter --build-arg AITER_BRANCH='${params.aiter_branch}' --build-arg CK_AITER_BRANCH='${params.ck_aiter_branch}' . " } else if(params.RUN_PYTORCH_TESTS){ image_name = "${env.CK_DOCKERHUB}:ck_pytorch" - dockerArgs = dockerArgs + " --no-cache -f Dockerfile.pytorch --build-arg CK_PYTORCH_BRANCH='${params.ck_pytorch_branch}' . " + dockerArgs = dockerArgs + " --no-cache -f projects/composablekernel/Dockerfile.pytorch --build-arg CK_PYTORCH_BRANCH='${params.ck_pytorch_branch}' . " } else{ - dockerArgs = dockerArgs + " -f Dockerfile . " + dockerArgs = dockerArgs + " -f projects/composablekernel/Dockerfile . " } echo "Build Args: ${dockerArgs}" try{ @@ -500,9 +500,10 @@ def build_client_examples(String arch){ } def build_client_examples_and_codegen_tests(String arch){ - def cmd = """ cmake -DCMAKE_PREFIX_PATH=/opt/rocm -DCMAKE_CXX_COMPILER="${params.BUILD_COMPILER}" ../codegen && \ + def cmd = """ cd ../codegen && rm -rf build && mkdir build && cd build && \ + cmake -DCMAKE_PREFIX_PATH=/opt/rocm -DCMAKE_CXX_COMPILER="${params.BUILD_COMPILER}" .. && \ make -j64 check && \ - cd ../client_example && rm -rf build && mkdir build && cd build && \ + cd ../../client_example && rm -rf build && mkdir build && cd build && \ cmake -DCMAKE_PREFIX_PATH="${env.WORKSPACE}/projects/composablekernel/install;/opt/rocm" \ -DGPU_TARGETS="${arch}" \ -DCMAKE_CXX_COMPILER="${params.BUILD_COMPILER}" \ @@ -511,7 +512,6 @@ def build_client_examples_and_codegen_tests(String arch){ return cmd } - def build_and_run_fmha(String arch){ def cmd = """ cmake -G Ninja -DCMAKE_PREFIX_PATH="${env.WORKSPACE}/projects/composablekernel/install;/opt/rocm" \ -DGPU_TARGETS="${arch}" \ @@ -855,7 +855,7 @@ def Build_CK(Map conf=[:]){ """ } // run performance tests, stash the logs, results will be processed on the master node - dir("script"){ + dir("projects/composablekernel/script"){ if (params.RUN_PERFORMANCE_TESTS){ if (params.RUN_FULL_QA && (arch == "gfx90a" || arch == "gfx942")){ // run full tests on gfx90a or gfx942 @@ -940,7 +940,7 @@ def process_results(Map conf=[:]){ withDockerContainer(image: image, args: '--cap-add=SYS_PTRACE --security-opt seccomp=unconfined -v=/var/jenkins/:/var/jenkins') { timeout(time: 15, unit: 'MINUTES'){ try{ - dir("script"){ + dir("projects/composablekernel/script"){ if (params.RUN_CK_TILE_FMHA_TESTS){ try{ unstash "perf_fmha_log_gfx942" @@ -1288,6 +1288,10 @@ pipeline { name: "RUN_INDUCTOR_TESTS", defaultValue: false, description: "Run inductor codegen tests (default: OFF)") + booleanParam( + name: "RUN_CODEGEN_TESTS", + defaultValue: true, + description: "Run codegen tests (default: ON)") booleanParam( name: "RUN_BUILDER_TESTS", defaultValue: true, @@ -1811,7 +1815,7 @@ pipeline { agent{ label rocmnode("gfx90a") } environment{ setup_args = """ -DCMAKE_INSTALL_PREFIX=../install -DGPU_TARGETS="gfx90a" -DCK_CXX_STANDARD="17" """ - execute_args = build_client_examples("gfx90a") + execute_args = build_client_examples_and_codegen_tests("gfx90a") } steps{ Build_CK_and_Reboot(setup_args: setup_args, config_targets: "install", build_type: 'Release', execute_cmd: execute_args, prefixpath: '/usr/local') diff --git a/cmake/gtest.cmake b/cmake/gtest.cmake index 51e0359ab6..33f0b4d548 100644 --- a/cmake/gtest.cmake +++ b/cmake/gtest.cmake @@ -70,6 +70,7 @@ set(GTEST_CXX_FLAGS -Wno-float-equal -Wno-lifetime-safety-intra-tu-suggestions -Wno-lifetime-safety-cross-tu-suggestions + -Wno-character-conversion ) if(WIN32) diff --git a/include/ck/tensor_operation/gpu/block/blockwise_gemm_mx_pipeline_xdlops_base.hpp b/include/ck/tensor_operation/gpu/block/blockwise_gemm_mx_pipeline_xdlops_base.hpp index 70453f5a0a..ff09040faa 100644 --- a/include/ck/tensor_operation/gpu/block/blockwise_gemm_mx_pipeline_xdlops_base.hpp +++ b/include/ck/tensor_operation/gpu/block/blockwise_gemm_mx_pipeline_xdlops_base.hpp @@ -113,7 +113,10 @@ struct BlockwiseGemmXdlops_mx_pipeline_base true> c_thread_buf_; - __host__ __device__ constexpr auto& GetCThreadBuffer() { return c_thread_buf_; } + __host__ __device__ constexpr auto& GetCThreadBuffer() [[clang::lifetimebound]] + { + return c_thread_buf_; + } __device__ static auto GetWaveIdx() { diff --git a/script/dependency-parser/src/enhanced_ninja_parser.py b/script/dependency-parser/src/enhanced_ninja_parser.py index ebcd878915..72386628ab 100644 --- a/script/dependency-parser/src/enhanced_ninja_parser.py +++ b/script/dependency-parser/src/enhanced_ninja_parser.py @@ -191,17 +191,17 @@ class EnhancedNinjaDependencyParser: if any( file_path.startswith(prefix) for prefix in [ - "include/", - "library/", - "test/", - "example/", - "src/", - "profiler/", - "build/include/", - "build/_deps/gtest", - "client_example", - "codegen", - "tile_engine", + "projects/composablekernel/include/", + "projects/composablekernel/library/", + "projects/composablekernel/test/", + "projects/composablekernel/example/", + "projects/composablekernel/src/", + "projects/composablekernel/profiler/", + "projects/composablekernel/build/include/", + "projects/composablekernel/build/_deps/gtest", + "projects/composablekernel/client_example", + "projects/composablekernel/codegen", + "projects/composablekernel/tile_engine", ] ): return True