Skip to content
This repository was archived by the owner on Aug 20, 2026. It is now read-only.

fix: thread a real per-channel weight stride through the field _jrls drivers - #53

Merged
balbasty merged 2 commits into
mainfrom
claude/65-jrls-per-channel-weight
Aug 2, 2026
Merged

fix: thread a real per-channel weight stride through the field _jrls drivers#53
balbasty merged 2 commits into
mainfrom
claude/65-jrls-per-channel-weight

Conversation

@balbasty

Copy link
Copy Markdown
Collaborator

Summary

field_matvec_rls/diag_rls/relax_rls dispatch to the _jrls variants
(matvec/diag/relax × absolute/membrane/bending, 9 functions
here) when the weight tensor's trailing dim equals the field's channel
count (wc == nc, a genuine per-channel weight). The driver functions
here either didn't compute a per-channel stride at all, or
(matvec_membrane_jrls) computed one but never passed it to the kernel
call — dead code, a leftover from an unfinished wiring attempt noted in
fastfields-cpu-lib#65. Every channel silently got channel 0's weight
instead of its own.

Fix

Verification

Validated transitively through fastfields-cpu-lib: make -C fastfields-cpu-lib test CXX=clang++12/12 suites, 44988 checks, 0
failures
— including the new ground-truth JRLS regression tests in
fastfields-cpu-lib's PR for this issue (which bumps this branch as its
impl pin).

part of fastfields/fastfields-cpu-lib#65

Workstream: claude-jitfields-to-fastfields

🤖 Generated with Claude Code


Generated by Claude Code

…drivers
field_matvec_rls/diag_rls/relax_rls dispatch to the _jrls variants
(matvec/diag/relax x absolute/membrane/bending, 9 functions) when the
weight tensor's trailing dim equals the field's channel count (wc == nc,
genuine per-channel weight). The driver functions here either didn't
compute a per-channel stride at all, or (matvec_membrane_jrls) computed
one but never passed it to the kernel call -- dead code, a leftover from
an unfinished wiring attempt. Every channel silently got channel 0's
weight instead of its own.
Compute wsc = stride_wgt[nall] (the weight tensor's real last-dim stride
-- the opposite of RLS/wc=1, which forces wsc to 0 to broadcast) and pass
it through to the now-fixed _jrls kernels.
part of fastfields-cpu-lib#65
_Workstream: claude-jitfields-to-fastfields_
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AjQcY78NgbagPSbPJRr6Z
part of fastfields-cpu-lib#65
_Workstream: claude-jitfields-to-fastfields_
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016AjQcY78NgbagPSbPJRr6Z
@balbastybalbasty added bug Something isn't working claude-jitfields-to-fastfields labels Aug 2, 2026 — with Claude
@balbasty
balbasty merged commit 24254d4 into mainAug 2, 2026
2 of 3 checks passed
@balbasty
balbasty deleted the claude/65-jrls-per-channel-weight branch August 2, 2026 20:20
balbasty added a commit that referenced this pull request Aug 3, 2026
…uperseded by the field_rls_is_jrls predicate fix (#59)
* Revert "fix: thread a real per-channel weight stride through the field _jrls drivers (#53)"
This reverts commit 24254d4.
* Revert "fix: force the RLS weight-channel stride to 0 for broadcast reads (#48)"
This reverts commit 1bfacc5.
* chore: bump kernels submodule pin to the reverted _jrls per-channel stride
part of fastfields-cpu-lib#65
* style: run clang-format on reg_field.h after the RLS/JRLS revert
Mechanical formatting only (alignment, template-bracket spacing, line
wrapping) -- no semantic change. The pre-#48 code this revert restores
predates the clang-format lint gate and wasn't clean against it.
---------
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bugSomething isn't workingclaude-jitfields-to-fastfields

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@balbasty@claude