mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #1585] nvcc throws a lot of warnings during build #635
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#635
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @fukc-gihtub on GitHub (Oct 8, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/1585
It's probably worth fixing.
Some of them:
@Niko1221 commented on GitHub (Oct 13, 2026):
Thanks for the report. To keep the tracker current we are closing issues older than three days: 0.1.44 is out with a long list of fixes, and many older reports are covered by it or by 0.1.43.1.
If this still happens on 0.1.44, please leave a comment here with your engine log (and the version line it prints), and we will reopen it. A new issue that links this one works too.
@ackalker commented on GitHub (Nov 3, 2026):
Still open on
mainon 2026-11-03, and two of the cases look like more than cosmetic noise, so I am putting my log in this thread rather than opening a third report.What I ran.
./update.shin a source checkout at commitffa80d73(Strata 0.2.10, engine 0.1.56, ggml pinned atffa80d73), CUDA build (-DSTRATA_ENABLE_CUDA=ON,CMAKE_CUDA_ARCHITECTURES=120), RTX 5080 16 GB, 64 GB RAM, Fedora 44 (Workstation), gcc 16.2.1, cmake 4.4.3, ninja 1.13.2,nvccrelease 13.4 V13.4.92 (/opt/cuda). The build finished and the engine links; nothing failed.Counts, today's run. 245 nvcc warnings and 12 gcc warnings.
nvcc, by code:
#128-D: loop is not reachable— 208. By site:src/kernels/cuda/native_mmvq.cu(1329)147,src/kernels/cuda/native_bf16.cu(287)32,src/kernels/cuda/fused_gr.cu(926)16, theniq_kernels.cuat 5968 (5), 4041, 3960, 3823, 3712 anddflash2.cu(344).#177-D: declared but never referenced— 22 (fused_gr.cu650 twice, 749, 1290dot8v, 1537qfuse_hc_local;gdn.cu(35)softplus_f;gr.cu(112)block_sum;iq_kernels.cu(6845)w2_h2; and others).#611-D: overloaded virtual function … only partially overridden— 4 (two sites, each printed twice):include/strata/core/expert_source.hpp(710)FileExpertSource,(1261)ArenaExpertSource, both aboutExpertSource::prefetch.#20280-D: … must have a definition in the current translation unit— 4 (s2_expert_grouped.cu847, 911, 986, 1098).#550-D: variable was set but never used— 3 (dflash2.cu(775)win,qsa_select.cu(2458)x,q36_engine.cu(1648)v).#20199-D: unrecognized #pragma in device code— 2 (verify_kernels.cu(305),iq_kernels.cu(3840)).#63-D: shift count is too large— 1 (qsa_select.cu(2501)).#20058-D: the #pragma unroll must precede a loop— 1 (iq_kernels.cu(5583)).gcc: 3 ×
-Wmisleading-indentation("this 'if' clause does not guard…") atsrc/core/layer.cpp:561:1,:1215:5,:1651:1; 9 ×-Wunused-variable:n_kvsrc/core/layer.cpp:1144:385,hcd:1501:23,fsrc/core/verify.cpp:3728:20,ssqsrc/prefill/prefill.cpp:6701:29,multi:6622:16,laysrc/program/generate.cpp:7755:21,:7781:21,:7872:29,w:14683:30.Two of these are not just noise. I checked them by reading the code and, for the first one, by disassembling the object this build produced; both have their own issues now:
#pragma clang fp contract(off)is not understood by nvcc, so three CUDA sites that say in a comment that the product must be rounded on its own get it contracted into an FMA. In the object from this build,src/kernels/cuda/native_moe.cu.o,combine<true,true>ends the gated shared-expert loop withFFMA.FTZ R35, R4, R10, R35— the shared-expert value multiplied by the gate and added to the accumulator in one instruction, instead of a rounded multiply and then an add.#20199-Dis the warning that points straight at it.#611-D.ExpertSourcedeclares twoprefetchoverloads and each source overrides one:FileExpertSourceonly the batch form,ArenaExpertSourceonly the single-expert form. So the single-expert calls atsrc/program/generate.cpp:9104,:12585,:12600,:12984,:19919do nothing when the file source is the active one (srcp = &src,generate.cpp:7203), and the batch call atsrc/core/expert_source.cpp:5122does nothing when the arena source is (srcp = &arena_src,generate.cpp:7387). Static reading only — I measured no runtime cost.About the 208
#128-D, which is what this thread is really about. I think almost all of them are the fallback path after aconstexprbranch that returns early, reported once per template instantiation.native_mmvq.cu:1309isif constexpr (TS) { … return; }at:1326, so for the instantiations that take it, the loop at:1329is unreachable;native_bf16.cu:274if constexpr (BLOCK_SIZE > 32)returns at:277and:284before the loop at:287. That fits the counts: 147 from one site is one per instantiation. So the warning is not saying that a computation is skipped at run time — the branch was never compiled in for that instantiation. If that reading is right, the way to quiet 208 of the 245 without hiding anything real is theif constexprtail (or#pragma nv_diag_suppress 128around those blocks); the#63-Dshift and the two#20199-Dare the ones I would look at first by hand.I have no measurement of speed or output differences from any of this, and none of the 245 warnings was a build failure.