Skip to content

Record conv1d/conv3d through the recording decorator (#532)#533

Merged
michalharakal merged 1 commit intodevelopfrom
fix/532-recording-decorator-conv1d-conv3d
Apr 19, 2026
Merged

Record conv1d/conv3d through the recording decorator (#532)#533
michalharakal merged 1 commit intodevelopfrom
fix/532-recording-decorator-conv1d-conv3d

Conversation

@michalharakal
Copy link
Copy Markdown
Contributor

Fixes #532.

Summary

  • RecordingTensorOpsDecorator.conv1d / .conv3d now call record(...) with Conv1dOperation / Conv3dOperation and the stride / padding / dilation / groups parameters, matching what conv2d has always done. Previously both overrode the base interface but only forwarded to base.conv*(...) and dropped the trace entirely.
  • Added Conv1dOperation and Conv3dOperation classes in skainet-lang-core (they didn't exist — only Conv2dOperation did). They mirror Conv2dOperation's behaviour.
  • Extended the stableInputName helper in RecordingExecution.kt so the new conv ops get the input / weight / bias naming already used by conv2d.
  • Added SimpleExecutionTapeTest.records_conv1d_through_recording_decorator and records_conv3d_through_recording_decorator that route calls through Execution.recordingOps and assert the tape captured the ops with correct stable names, static input / output shapes, and parameters.

Context

Discovered while investigating #530 (the tape's other recording path, via DefaultExecutionTape.recordTrace, was also losing static conv1d shapes). #530 already unblocks the Whisper → IREE / Vulkan pipeline (that path uses the KSP-generated tracer). This PR closes the symmetric gap on the Execution.recordingOps(...) public API so both recording paths stay consistent.

Test plan

  • ./gradlew :skainet-compile:skainet-compile-core:jvmTest --tests 'sk.ainet.tape.SimpleExecutionTapeTest.*' passes locally.
  • apiCheck output for skainet-lang-core shows only the three new Conv{1,3}dOperation entries compared to develop (develop's apiCheck has pre-existing unrelated drift, not touched here).

🤖 Generated with Claude Code

RecordingTensorOpsDecorator.conv1d and .conv3d overrode the base TensorOps
but only called base.conv*(...) — they never invoked record(...), so every
conv1d/conv3d call routed through Execution.recordingOps(...) was silently
dropped from the tape. conv2d always recorded correctly. Supporting
Conv1dOperation and Conv3dOperation classes also didn't exist.

- Add Conv1dOperation and Conv3dOperation mirroring Conv2dOperation.
- Wire conv1d and conv3d in the decorator to record the operation along
  with stride / padding / dilation / groups, same as conv2d.
- Extend the stable-input-name helper so the new conv ops get
  input / weight / bias naming.
- Add SimpleExecutionTapeTest cases that route a conv1d and a conv3d
  through the decorator and assert the tape captured the ops, the stable
  names, the static input / output shapes, and the parameters.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@michalharakal michalharakal merged commit 322f0cc into develop Apr 19, 2026
7 checks passed
@michalharakal michalharakal deleted the fix/532-recording-decorator-conv1d-conv3d branch April 19, 2026 17:27
@github-actions
Copy link
Copy Markdown

📖 Documentation Preview

The documentation has been built successfully for this PR.

Generated Files:

  • Operator documentation: docs/modules/operators/_generated_/
  • JSON schema output: operators.json

Artifacts:

  • Download the documentation-preview-533 artifact to view the complete documentation locally.

This comment will be updated automatically when the PR is updated.

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.

RecordingTensorOpsDecorator drops conv1d/conv3d traces silently

1 participant