You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Implement the 1 empty function body in specs/ml/loss/kl_divergence.t27 #3955
Implement the 1 empty function body in specs/ml/loss/kl_divergence.t27
Context
specs/ml/loss/kl_divergence.t27 is 26 lines long. 1 of its functions is declared with a body that holds no statement - a signature and a comment where the implementation belongs.
.t27 is the hand-authored source language.t27c compiles it out to C, Rust, Verilog and Zig. You are writing source, not compiler output, and not prose about an implementation.
Use ./target/release/t27c, not the t27c on PATH: the PATH build prints no parse metrics at all, so the grep above returns nothing and an empty result reads as a pass.
What to write
Keep every signature exactly as it is - the signature is the contract. Quoted verbatim from the file:
line 14 - fn forward(p: []const f32) -> void
The file already has 0 test block(s). Add one for each function you implement; a body with nothing asserting on it is a claim, not a result.
Acceptance criteria
/Users/playom/t27/target/release/t27c gen specs/ml/loss/kl_divergence.t27 2>&1 | grep -c 'not yet implemented' prints 0 (today: 1)
with criterion 1 satisfied, /Users/playom/t27/target/release/t27c parse specs/ml/loss/kl_divergence.t27 2>&1 | grep -E '^(recovery-events|declarations-swallowed|lexer-discarded-chars):' reports 0, 0 and 0
with criterion 1 satisfied, all 1 name above still exist: grep -cE '^\s*(pub )?fn (forward)\(' specs/ml/loss/kl_divergence.t27 prints 1
grep -c '^\s*test "' specs/ml/loss/kl_divergence.t27 prints at least 1 (today: 0)
Activity
Implement the forward function in KL divergence loss module