Skip to content

Refactor: migrate 5 L2 scene tests to SceneTestCase#518

Open
hw-native-sys-bot wants to merge 1 commit intohw-native-sys:mainfrom
hw-native-sys-bot:refactor/migrate-l2-tests
Open

Refactor: migrate 5 L2 scene tests to SceneTestCase#518
hw-native-sys-bot wants to merge 1 commit intohw-native-sys:mainfrom
hw-native-sys-bot:refactor/migrate-l2-tests

Conversation

@hw-native-sys-bot
Copy link
Copy Markdown
Collaborator

Summary

  • Migrate 5 old-style (golden.py + kernel_config.py) tests to SceneTestCase classes
  • Move kernel sources from tests/st/ to examples/, delete old golden.py + kernel_config.py
  • Add golden/ to pytest pythonpath for shared paged_attention_golden imports

Tests migrated (each verifies a new framework feature):

  1. scalar_data_test: multi-output (D.OUT x2), empty kernel signature ([])
  2. alternating_matmul_add: int64 scalars, AIC (CUBE) matmul kernel, RTOL=1e-3
  3. paged_attention_ringbuffer: RUNTIME_ENV, D.INOUT tensors, bfloat16
  4. aicpu_build_graph/paged_attention: aicpu_build_graph runtime, hub kernels
  5. host_build_graph/paged_attention: host_build_graph runtime (st version replaces example's small-scale version)

Test plan

  • pytest tests/ut -x -q — 149 passed
  • pytest --collect-only — 5 new tests collected without errors
  • CI: all new tests run on sim platforms

🤖 Generated with Claude Code

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request transitions the Paged Attention implementation from a small-scale float16 prototype to a production-scale bfloat16 version. Key changes include updating AIC and AIV kernels to support dynamic tile configurations via template dispatch, modifying the orchestration logic to handle larger scales, and introducing a comprehensive suite of tests for various runtimes (aicpu_build_graph, host_build_graph, and tensormap_and_ringbuffer). Additionally, several legacy configuration and golden test files were removed, and the project configuration was updated to include the golden directory in the Python path. I have no feedback to provide as there were no review comments to assess.

@hw-native-sys-bot hw-native-sys-bot force-pushed the refactor/migrate-l2-tests branch 4 times, most recently from 0abece2 to 6d658d9 Compare April 10, 2026 12:24
…TestCase

Move 5 old-style (golden.py + kernel_config.py) tests to SceneTestCase:
- scalar_data_test: multi-output (D.OUT x2), kernel_noop (empty signature)
- alternating_matmul_add: int64 scalars, AIC matmul kernel, RTOL=1e-3
- paged_attention_ringbuffer: RUNTIME_ENV, INOUT tensors, bfloat16
- aicpu_build_graph/paged_attention: aicpu_build_graph runtime, hub kernels
- host_build_graph/paged_attention: host_build_graph runtime (st version
  replaces example's small-scale version)

Also add golden/ to pytest pythonpath for paged_attention_golden imports.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@hw-native-sys-bot hw-native-sys-bot force-pushed the refactor/migrate-l2-tests branch from 6d658d9 to 00fc6a0 Compare April 10, 2026 13:07
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.

2 participants