diff --git a/ggml/src/ggml-hrx/ggml-hrx.cpp b/ggml/src/ggml-hrx/ggml-hrx.cpp index 120a422b4d10..7c3ef8152965 100644 --- a/ggml/src/ggml-hrx/ggml-hrx.cpp +++ b/ggml/src/ggml-hrx/ggml-hrx.cpp @@ -2521,16 +2521,16 @@ static bool ggml_backend_hrx_load_catalog_provider( executable, export_ordinal, &export_info)) && export_info.binding_count == entry->binding_count && export_info.parameter_count == entry->parameter_count && - export_info.constant_count * sizeof(uint32_t) == entry->constants_size; + export_info.constant_byte_length == entry->constants_size; if (!ok) { GGML_LOG_WARN( "%s: HRX catalog kernel %s has unsupported ABI " - "(bindings=%u expected=%u constants=%u constants_size=%u parameters=%u expected_parameters=%u workgroup=%ux%ux%u)\n", + "(bindings=%u expected=%u constant_bytes=%u expected_constant_bytes=%u parameters=%u expected_parameters=%u workgroup=%ux%ux%u)\n", __func__, entry->name, export_info.binding_count, entry->binding_count, - export_info.constant_count, + export_info.constant_byte_length, entry->constants_size, export_info.parameter_count, entry->parameter_count, diff --git a/ggml/src/ggml-hrx2/CMakeLists.txt b/ggml/src/ggml-hrx2/CMakeLists.txt index 541c3b239fe3..0f8d0620f268 100644 --- a/ggml/src/ggml-hrx2/CMakeLists.txt +++ b/ggml/src/ggml-hrx2/CMakeLists.txt @@ -2,6 +2,7 @@ message(STATUS "Using HRX2 backend") find_package(Python3 COMPONENTS Interpreter REQUIRED) find_package(hrx CONFIG REQUIRED) +find_package(loomc CONFIG REQUIRED) set(GGML_HRX2_GENERATED_DIR "${CMAKE_CURRENT_BINARY_DIR}/generated") set(GGML_HRX2_ARTIFACT_ROOT "${GGML_HRX2_GENERATED_DIR}/catalog") @@ -68,10 +69,9 @@ find_program(GGML_HRX2_LOOM_LINK_EXECUTABLE REQUIRED ) -if(NOT TARGET loom::binding::c::loomc OR NOT TARGET loom::binding::c::target::amdgpu) +if(NOT TARGET loomc::loomc) message(FATAL_ERROR - "HRX2 requires HRX to export Loom C API CMake targets " - "loom::binding::c::loomc and loom::binding::c::target::amdgpu") + "HRX2 requires HRX to export the Loom C API CMake target loomc::loomc") endif() add_custom_command( @@ -146,8 +146,7 @@ ggml_add_backend_library(ggml-hrx2 target_link_libraries(ggml-hrx2 PRIVATE hrx::hrx - loom::binding::c::loomc - loom::binding::c::target::amdgpu + loomc::loomc ) target_include_directories(ggml-hrx2 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../../../vendor