Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/scripts/therock_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
},
Expand Down
5 changes: 5 additions & 0 deletions dnn-providers/hip-kernel-provider/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
71 changes: 41 additions & 30 deletions dnn-providers/hip-kernel-provider/rocke/platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/<subdir>/,
# 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/<subdir>/,
# 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)
Expand All @@ -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/<subdir>/, 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/<subdir>/, 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
Expand Down
Loading