Skip to content

feat: add L2-bypass cache policy to tload - #1359

Open
zhangstevenunity wants to merge 1 commit into
mainfrom
codex/tload-l2-bypass
Open

feat: add L2-bypass cache policy to tload#1359
zhangstevenunity wants to merge 1 commit into
mainfrom
codex/tload-l2-bypass

Conversation

@zhangstevenunity

Copy link
Copy Markdown
Collaborator

Summary

  • add an optional typed cache_policy attribute to pto.tload
  • preserve legacy TLOAD(dst, src) lowering for absent/default policy
  • lower l2_bypass to TLOAD<pto::LoadCachePolicy::L2Bypass>(dst, src) without emitting a target address-alias constant
  • expose the policy through C and Python bindings, reject it on A5, and document the A2/A3 behavior
  • add lit, Python binding, and PTO bytecode round-trip coverage

Validation

  • PTOAS changed-code compliance: 0 errors, 0 warnings
  • compiled the changed PTO IR, EmitC lowering, conversion, C API, and Python binding translation units
  • generated Python TLoadOp with the cache_policy keyword
  • passed ptobc_tload_cache_policy_v0_encode CTest
  • passed Python syntax, Bash syntax, and Git whitespace checks

Target dependency

The generated bypass call establishes the PTOAS-to-PTO-ISA contract. PTO-ISA still needs to provide the matching pto::LoadCachePolicy and templated TLOAD implementation before bypass kernels can compile and execute end to end.

Relates to #1356

@zhangstevenunity
zhangstevenunity marked this pull request as ready for review August 26, 2026 09:50
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

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.

1 participant