[Build] 0.2.20: strata-load / strata-concurrent / strata-overlap / pinned_shared_test fail to link — pinned.cu's NUMA arena calls expert_layout() from strata_core

オープン 初心者向け
#6,934 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 5 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
cmake, cpp
領域
build-system

調査の方向性

リンク失敗は engine/cmake/strata_gpu_engine.cmake の4つのサイドツール target(strata-load、strata-concurrent、strata-overlap、pinned_shared_test)が strata_core と strata_kernels だけをリンクしている一方、engine/src/core/pinned.cu が strata_kernels_cpu から strata::kernels::cpu::expert_layout() を呼び出していることに由来します。まずそれらの target_link_libraries 行を確認し、1つの target のリンクのみのビルドでシンボルが欠けていることを確かめてください。HIP ビルドで4つの target すべてが rc=0 でリンクしたら完了です。理想的には各 target に strata_kernels_cpu を追加することによって。

索引モデルが issue の本文から書いたものです。

説明

needs-format

Hi — we maintain a small gfx1100 replay fork (xyzzing/Strata) and re-play our carried commits onto every upstream tag; the fresh full build in that routine is how this surfaced. Sharing in case the exact target list saves you the lookup.

Problem and result

At the v0.2.20 tag (a34979fc9), a Linux HIP build (gfx1100, vendored ROCm SDK), four side-tool targets fail to link on a pristine checkout:

$ ninja -k 0
FAILED: [code=1] strata-overlap
FAILED: [code=1] strata-load
FAILED: [code=1] pinned_shared_test
FAILED: [code=1] strata-concurrent
ld.lld: error: undefined symbol: strata::kernels::cpu::expert_layout()
>>> referenced by pinned.cu
>>>               pinned.cu.o:(strata::core::(anonymous namespace)::place_arena_numa_slices(void*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>&)) in archive libstrata_core.a
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: cannot make progress due to previous errors.

The main strata binary links fine — only the four tools break.

Cause

The 0.2.20 integration commits (534802c8d, ad4c565e8) added the NUMA-arena slicing (place_arena_numa_slices, STRATA_NUMA_ARENA) to engine/src/core/pinned.cu, which calls strata::kernels::cpu::expert_layout() — declared in include/strata/kernels/cpu/expert_layout.hpp, defined in src/kernels/cpu/expert_layout.cpp, compiled into the strata_kernels_cpu static library. strata_engine links strata_kernels_cpu (cmake/strata_gpu_engine.cmake, the PUBLIC link line), which is why strata resolves the symbol; the four tools link only strata_core (+ strata_kernels) and so pull an unresolved reference out of the archive.

Suggested fix

One link line each in engine/cmake/strata_gpu_engine.cmake:

  • strata-load (line ~27): add strata_kernels_cpu to target_link_libraries
  • strata-concurrent (line ~31): same
  • strata-overlap (line ~36): same
  • pinned_shared_test (line ~1302, the Linux-only block): same

Link-graph only, no source change — with those four additions the full HIP graph builds rc=0 (779 targets here).

Notes
  • Flagging in case it's useful: if the Linux CI matrix doesn't build these HIP side-tool targets, that would explain why it landed quietly — same class of paths hole as the register one in #6629, entirely your call whether it's worth closing.
  • We carry the four link lines fork-side; happy to send them as a PR if that's less work than applying by hand.

Prepared with AI assistance (fork-maintenance agent); reviewed and posted by the operator.

主要言語
C++
スター
11.6k
フォーク
1k
平均マージ
17日 21時間
マージ済み PR(30日)
3

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Niko1221/Strata のほかの issue

Niko1221/Strata の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。