Skip to content

hrx: promote the installed-package targets to GLOBAL so the HRX unit tests link - #432

Merged
bong-water-water-bong merged 2 commits into
1bit/hrx-vulkan-patchedfrom
corpus/hrx-package-targets
Nov 20, 2026
Merged

bong-water-water-bong merged 2 commits into
1bit/hrx-vulkan-patchedfrom
corpus/hrx-package-targets

Conversation

@bong-water-water-bong

Copy link
Copy Markdown

A tree configured against an installed hrx + loomc (CMAKE_PREFIX_PATH=/home/bcloud/hrx-latest-install, the normal local setup) cannot generate:

CMake Error at tests/CMakeLists.txt:547 (target_link_libraries):
  Target "test-hrx-buffer" links to:
    hrx::hrx
  but the target was not found.

find_package(hrx CONFIG) / find_package(loomc CONFIG) in ggml/src/ggml-hrx/CMakeLists.txt import their targets into that directory scope. tests/ is a sibling, and it links hrx::hrx / loomc::loomc directly (lines 547–638), so those targets are invisible there. The HRX_SOURCE_DIR branch above already declares its own copies IMPORTED GLOBAL for the same reason.

This promotes the package-imported targets to GLOBAL, which is the whole fix.

Verification

cmake -DGGML_HRX=ON -DCMAKE_PREFIX_PATH=/home/bcloud/hrx-latest-install ...: before, 10 target_link_libraries errors and CMake Generate step failed; after, -- Configuring done / -- Generating done.

Build and test evidence for the HRX test binaries themselves comes from the stacked branch (corpus/fa-kv-tile-on-hrx), which carries this commit.

…tests link

find_package(hrx CONFIG) / find_package(loomc CONFIG) import their targets into
the ggml-hrx directory scope, and tests/CMakeLists.txt - a sibling - links
hrx::hrx and loomc::loomc directly. A tree configured against an installed
hrx (CMAKE_PREFIX_PATH=/home/bcloud/hrx-latest-install, the normal local setup)
therefore failed to generate:

  Target "test-hrx-buffer" links to: hrx::hrx but the target was not found.

The HRX_SOURCE_DIR branch declares its own copies GLOBAL for exactly this
reason; this does the same for the package branch. Configure with an installed
hrx + loomc now reaches "Generating done".
loom-jit.cpp called loomc_link_index_builder_allocate and used
loomc_link_index_builder_free as the deleter; the installed loomc exposes
loomc_link_index_builder_create and loomc_link_index_builder_release (see
loomc/link_index.h:302/312). The unit therefore did not compile at all against
the package, so no HRX test binary in a package-configured tree could be built:

  loom-jit.cpp:223: error: 'loomc_link_index_builder_free' was not declared in this scope

Same three call sites, renamed. loom-jit.cpp.o now builds.
@bong-water-water-bong
bong-water-water-bong merged commit bccadbe into 1bit/hrx-vulkan-patched Nov 20, 2026
@bong-water-water-bong
bong-water-water-bong deleted the corpus/hrx-package-targets branch November 20, 2026 03:11
bong-water-water-bong added a commit that referenced this pull request Nov 20, 2026
… API the pinned hrx-system predates (engine#2916) (#446)

loom-jit.cpp was changed to loomc_link_index_builder_create/_release by 5635e24 (carried by #434),
written against an installed loomc from hrx-system 0b1422f63 -- which is an ANCESTOR of the tree the
engine pins (7f423692). So the rename moved the fork onto names the pin had already removed:

  loom-jit.cpp:223: 'loomc_link_index_builder_release' was not declared; did you mean '..._free'?
  loom-jit.cpp:756: 'loomc_link_index_builder_create' was not declared

Three call sites, back to the allocate/free pair every other handle in the file already uses. This reverts
the hunk only: #432's CMake targets and #436/#438 are untouched.

Co-authored-by: bong-water-water-bong <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant