From d4d1f0ed3abbdab54f469d8c5d8128b38f6ddf8b Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Mon, 20 Oct 2025 21:01:20 +0000 Subject: [PATCH 1/4] bump and fix lit; cpu is also at single dispatch (global opt?) --- sharkfuser/build_tools/docker/exec_docker_ci.sh | 2 +- sharkfuser/tests/lit/test_conv_asm_emitter_ndhwc_kdrsc.cpp | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sharkfuser/build_tools/docker/exec_docker_ci.sh b/sharkfuser/build_tools/docker/exec_docker_ci.sh index 28618fbdc3f..8b46cce5748 100755 --- a/sharkfuser/build_tools/docker/exec_docker_ci.sh +++ b/sharkfuser/build_tools/docker/exec_docker_ci.sh @@ -20,5 +20,5 @@ docker run --rm \ -v "${PWD}":/workspace \ ${DOCKER_RUN_DEVICE_OPTS} \ --security-opt seccomp=unconfined \ - ghcr.io/sjain-stanford/compiler-dev-ubuntu-24.04:main@sha256:93301b1799d0f77a8c811c70c1a1cf407955910949b097d3a5df5943d0b8e1e5 \ + ghcr.io/sjain-stanford/compiler-dev-ubuntu-24.04:main@sha256:d6d868b7a56c1914028d2d65b6171ffecdf65d11f81bf8b548bece6b8bdd856d \ "$@" diff --git a/sharkfuser/tests/lit/test_conv_asm_emitter_ndhwc_kdrsc.cpp b/sharkfuser/tests/lit/test_conv_asm_emitter_ndhwc_kdrsc.cpp index 28833a51ed8..768df484410 100644 --- a/sharkfuser/tests/lit/test_conv_asm_emitter_ndhwc_kdrsc.cpp +++ b/sharkfuser/tests/lit/test_conv_asm_emitter_ndhwc_kdrsc.cpp @@ -66,9 +66,8 @@ // LINALG-CHECK: %[[OUTT:.+]] = linalg.transpose ins(%[[OUT]] : tensor<16x256x1x64x32xf32>) outs(%{{.+}} : tensor<16x1x64x32x256xf32>) permutation = [0, 2, 3, 4, 1] // LINALG-CHECK: %{{.+}} = hal.tensor.alias wait(%{{.+}}) => %[[OUTT]] : tensor<16x1x64x32x256xf32> to %[[ARG0]] : !hal.buffer_view // -// TODO(iree-org/iree#22312): Change to 1 after IREE compiler fix -// AMDGPU-STATS-CHECK: "dispatch-count": 2 -// CPU-STATS-CHECK: "dispatch-count": 2 +// AMDGPU-STATS-CHECK: "dispatch-count": 1 +// CPU-STATS-CHECK: "dispatch-count": 1 // // clang-format on From cf40ed76c861be05961c92e456cbbe2f4d287ad1 Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Tue, 21 Oct 2025 13:38:24 +0000 Subject: [PATCH 2/4] failing test revealing memref issue --- sharkfuser/samples/convolution/conv_fprop_nchw_kcrs.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sharkfuser/samples/convolution/conv_fprop_nchw_kcrs.cpp b/sharkfuser/samples/convolution/conv_fprop_nchw_kcrs.cpp index 9f3705e91ee..f00778bd9ed 100644 --- a/sharkfuser/samples/convolution/conv_fprop_nchw_kcrs.cpp +++ b/sharkfuser/samples/convolution/conv_fprop_nchw_kcrs.cpp @@ -19,7 +19,7 @@ using namespace fusilli; TEST_CASE("Convolution fprop; X (NCHW), W (KCRS); 1x1 conv; no padding", "[conv][graph]") { - int64_t n = 16, c = 128, h = 64, w = 64, k = 256, r = 1, s = 1; + int64_t n = 4, c = 4, h = 4, w = 4, k = 4, r = 1, s = 1; auto build_new_graph = [=](const Handle &handle) { auto graph = std::make_shared(); @@ -98,7 +98,7 @@ TEST_CASE("Convolution fprop; X (NCHW), W (KCRS); 1x1 conv; no padding", std::vector result; FUSILLI_REQUIRE_OK(yBuf->read(handle, result)); for (auto val : result) - REQUIRE(val == half(128.0f)); + REQUIRE(val == half(4.0f)); // Execute graph a few times. constexpr size_t numIters = 1; @@ -109,5 +109,5 @@ TEST_CASE("Convolution fprop; X (NCHW), W (KCRS); 1x1 conv; no padding", result.clear(); FUSILLI_REQUIRE_OK(yBuf->read(handle, result)); for (auto val : result) - REQUIRE(val == half(128.0f)); + REQUIRE(val == half(4.0f)); } From 321925fb11312de2007e01c81c0abb9b269f7b79 Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Wed, 22 Oct 2025 22:05:31 +0000 Subject: [PATCH 3/4] bump --- sharkfuser/build_tools/docker/exec_docker_ci.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sharkfuser/build_tools/docker/exec_docker_ci.sh b/sharkfuser/build_tools/docker/exec_docker_ci.sh index 8b46cce5748..b7501dc1313 100755 --- a/sharkfuser/build_tools/docker/exec_docker_ci.sh +++ b/sharkfuser/build_tools/docker/exec_docker_ci.sh @@ -20,5 +20,5 @@ docker run --rm \ -v "${PWD}":/workspace \ ${DOCKER_RUN_DEVICE_OPTS} \ --security-opt seccomp=unconfined \ - ghcr.io/sjain-stanford/compiler-dev-ubuntu-24.04:main@sha256:d6d868b7a56c1914028d2d65b6171ffecdf65d11f81bf8b548bece6b8bdd856d \ + ghcr.io/sjain-stanford/compiler-dev-ubuntu-24.04:main@sha256:d52a5eb21ce21509f5fd1064074ba34f7ad8810c5d5c6caff9790149c8e05b3c \ "$@" From 1f4193ea8b5ff2ade6b542f5f14e153efb8dee44 Mon Sep 17 00:00:00 2001 From: Sambhav Jain Date: Thu, 23 Oct 2025 01:17:03 +0000 Subject: [PATCH 4/4] fix from Aaron (set LD_LIBRARY_PATH in plugin build to pick libhipdnn_backend.so from build dir not the global TheRock install) --- fusilli-plugin/test/integration/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fusilli-plugin/test/integration/CMakeLists.txt b/fusilli-plugin/test/integration/CMakeLists.txt index 0c06e8fe719..f2ba4dce4fd 100644 --- a/fusilli-plugin/test/integration/CMakeLists.txt +++ b/fusilli-plugin/test/integration/CMakeLists.txt @@ -26,4 +26,8 @@ target_compile_definitions(fusilli_plugin_integration_tests PRIVATE FUSILLI_PLUGIN_ENGINE_ID="${FUSILLI_PLUGIN_ENGINE_ID}" ) # Register with CTest -gtest_discover_tests(fusilli_plugin_integration_tests) +gtest_discover_tests(fusilli_plugin_integration_tests + # Ensure that tests pick up libhipdnn_backend.so in build directory, not + # from the global TheRock install. + PROPERTIES ENVIRONMENT "LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib" +)