diff --git a/.github/scripts/therock_matrix.py b/.github/scripts/therock_matrix.py index 19db7c92aecc..ea29a7fb5a7d 100644 --- a/.github/scripts/therock_matrix.py +++ b/.github/scripts/therock_matrix.py @@ -67,6 +67,7 @@ "cmake_options": [ "-DTHEROCK_ENABLE_HIPKERNELPROVIDER=ON", "-DHIP_KERNEL_PROVIDER_ENABLE=ON", + "-DTHEROCK_FLAG_HIPKERNELPROVIDER_ENABLE_ROCKE=ON", ], "projects_to_test": ["hipkernelprovider"], }, diff --git a/dnn-providers/hip-kernel-provider/CMakeLists.txt b/dnn-providers/hip-kernel-provider/CMakeLists.txt index 6c09f1cf4e5d..dc8f7e30c742 100644 --- a/dnn-providers/hip-kernel-provider/CMakeLists.txt +++ b/dnn-providers/hip-kernel-provider/CMakeLists.txt @@ -148,6 +148,11 @@ if(HIPKERNELPROVIDER_ENABLE_ROCKE) # must precede src/ below, which emits bin/hip_kernel_provider/CTestTestfile.cmake. set(ROCKE_INSTALL_PROVIDER_CTEST_SUBDIR "hip_kernel_provider") set(ROCKE_INSTALL_STANDALONE_CTEST OFF) + # Defer the Python rocKE CI tests (import smoke + golden): their test-artifact + # packaging (rocke package + scripts + golden JSON) is not yet wired into + # TheRock's hipkernelprovider artifact includes, so staging them here would + # fail CI. The C++ smoke tests stay enabled; re-enable once packaging lands. + set(ROCKE_INSTALL_PYTHON_TESTS OFF) add_subdirectory(rocke) else() message(STATUS "rocKE features disabled") diff --git a/dnn-providers/hip-kernel-provider/rocke/platform/CMakeLists.txt b/dnn-providers/hip-kernel-provider/rocke/platform/CMakeLists.txt index b81720111983..fbacd6cc3f9f 100644 --- a/dnn-providers/hip-kernel-provider/rocke/platform/CMakeLists.txt +++ b/dnn-providers/hip-kernel-provider/rocke/platform/CMakeLists.txt @@ -91,6 +91,13 @@ endif() option(ROCKE_BUILD_PYBIND "Build the rocke_engine Python extension module" OFF) option(ROCKE_INSTALL_PYTHON_PACKAGE "Install the rocke Python frontend" ON) option(ROCKE_INSTALL_TESTS "Install rocKE smoke test artifacts and CTest metadata" ON) +# The Python rocKE CI tests (import smoke + golden byte-stability) are gated +# separately from the C++ smoke tests. Provider mode turns them OFF until their +# test-artifact packaging is wired up (the rocke package, the smoke/golden +# scripts, and the golden JSON are not yet in TheRock's hipkernelprovider +# artifact includes, so staging them there fails at test time). Standalone +# runs, which package everything locally, keep them ON. +option(ROCKE_INSTALL_PYTHON_TESTS "Install rocKE Python smoke/golden CI tests" ON) option(ROCKE_INSTALL_STANDALONE_CTEST "Install standalone rocKE CTest metadata" ON) if(NOT DEFINED ROCKE_INSTALL_PROVIDER_CTEST_SUBDIR) set(ROCKE_INSTALL_PROVIDER_CTEST_SUBDIR "" CACHE STRING @@ -227,23 +234,25 @@ if(ROCKE_INSTALL_PYTHON_PACKAGE) endif() if(ROCKE_INSTALL_TESTS) - # The Python import smoke (placeholder for the rocke Python CI test) installs - # next to the CTestTestfile in both modes: provider mode -> bin//, - # standalone -> bin/. In provider mode it imports the co-located rocke package - # installed above; TheRock's test artifact captures both via explicit includes. - install(PROGRAMS "${CMAKE_CURRENT_SOURCE_DIR}/tools/rocke_installed_smoke.py" - DESTINATION ${ROCKE_TEST_INSTALL_DIR}) + if(ROCKE_INSTALL_PYTHON_TESTS) + # The Python import smoke (placeholder for the rocke Python CI test) installs + # next to the CTestTestfile in both modes: provider mode -> bin//, + # standalone -> bin/. In provider mode it imports the co-located rocke package + # installed above; TheRock's test artifact captures both via explicit includes. + install(PROGRAMS "${CMAKE_CURRENT_SOURCE_DIR}/tools/rocke_installed_smoke.py" + DESTINATION ${ROCKE_TEST_INSTALL_DIR}) - # Host-only golden IR byte-stability gate. The relocatable runner rebuilds the - # representative IR from the co-located rocke package and compares digests to - # the committed golden. It needs the parity harness module (imported by name) - # and the golden JSON co-located next to it; no GPU and no examples required. - install(PROGRAMS "${CMAKE_CURRENT_SOURCE_DIR}/tests/rocke_installed_golden_test.py" - DESTINATION ${ROCKE_TEST_INSTALL_DIR}) - install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/tests/instances/rocke_ir_parity_harness.py" - DESTINATION ${ROCKE_TEST_INSTALL_DIR}) - install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/tests/golden/rocke_representative_ir_sha256.json" - DESTINATION ${ROCKE_TEST_INSTALL_DIR}/golden) + # Host-only golden IR byte-stability gate. The relocatable runner rebuilds the + # representative IR from the co-located rocke package and compares digests to + # the committed golden. It needs the parity harness module (imported by name) + # and the golden JSON co-located next to it; no GPU and no examples required. + install(PROGRAMS "${CMAKE_CURRENT_SOURCE_DIR}/tests/rocke_installed_golden_test.py" + DESTINATION ${ROCKE_TEST_INSTALL_DIR}) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/tests/instances/rocke_ir_parity_harness.py" + DESTINATION ${ROCKE_TEST_INSTALL_DIR}) + install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/tests/golden/rocke_representative_ir_sha256.json" + DESTINATION ${ROCKE_TEST_INSTALL_DIR}/golden) + endif() set(_ROCKE_INSTALLED_CTEST_ENTRIES "") get_property(_ROCKE_INSTALL_TEST_TARGETS GLOBAL PROPERTY ROCKE_INSTALL_TEST_TARGETS) @@ -255,21 +264,23 @@ if(ROCKE_INSTALL_TESTS) "set_tests_properties(${_test_target} PROPERTIES LABELS \"ckc;unit;host;quick\")\n") endforeach() - # Stage the Python import smoke in both modes. It sits next to the - # CTestTestfile (provider: bin//, standalone: bin/rocke/ -> "../"), so - # the same "${ROCKE_TEST_CTEST_REL}" prefix reaches it. The co-located rocke - # package is captured by TheRock's test-artifact includes in provider mode. - string(APPEND _ROCKE_INSTALLED_CTEST_ENTRIES - "add_test(rocke_python_import_smoke \"${ROCKE_TEST_CTEST_REL}rocke_installed_smoke.py\")\n") - string(APPEND _ROCKE_INSTALLED_CTEST_ENTRIES - "set_tests_properties(rocke_python_import_smoke PROPERTIES LABELS \"ckc;python;quick\")\n") + if(ROCKE_INSTALL_PYTHON_TESTS) + # Stage the Python import smoke in both modes. It sits next to the + # CTestTestfile (provider: bin//, standalone: bin/rocke/ -> "../"), so + # the same "${ROCKE_TEST_CTEST_REL}" prefix reaches it. The co-located rocke + # package is captured by TheRock's test-artifact includes in provider mode. + string(APPEND _ROCKE_INSTALLED_CTEST_ENTRIES + "add_test(rocke_python_import_smoke \"${ROCKE_TEST_CTEST_REL}rocke_installed_smoke.py\")\n") + string(APPEND _ROCKE_INSTALLED_CTEST_ENTRIES + "set_tests_properties(rocke_python_import_smoke PROPERTIES LABELS \"ckc;python;quick\")\n") - # Golden IR byte-stability gate (host-only, no GPU). Reached via the same - # relative prefix as the smoke; imports the co-located rocke package + harness. - string(APPEND _ROCKE_INSTALLED_CTEST_ENTRIES - "add_test(rocke_golden_static \"${ROCKE_TEST_CTEST_REL}rocke_installed_golden_test.py\")\n") - string(APPEND _ROCKE_INSTALLED_CTEST_ENTRIES - "set_tests_properties(rocke_golden_static PROPERTIES LABELS \"ckc;python;golden;host;quick\")\n") + # Golden IR byte-stability gate (host-only, no GPU). Reached via the same + # relative prefix as the smoke; imports the co-located rocke package + harness. + string(APPEND _ROCKE_INSTALLED_CTEST_ENTRIES + "add_test(rocke_golden_static \"${ROCKE_TEST_CTEST_REL}rocke_installed_golden_test.py\")\n") + string(APPEND _ROCKE_INSTALLED_CTEST_ENTRIES + "set_tests_properties(rocke_golden_static PROPERTIES LABELS \"ckc;python;golden;host;quick\")\n") + endif() if(ROCKE_INSTALL_PROVIDER_CTEST_SUBDIR) set_property(GLOBAL APPEND_STRING PROPERTY