Repository navigation
Generate ring masks directly as packed bits (#24089) - #24089
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/24089
Note: Links to docs will display an error until the docs builds have been completed. ⏳ 1 Pending, 1 Unrelated FailureAs of commit 2536527 with merge base 8916832 ( BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@ThomasJannaud has exported this pull request. If you are a Meta employee, you can view the originating Diff in D126734014. |
This PR needs a
|
Summary: Dense ring masks require an avoidable allocation and packing pass. Add `sdpa_bitwise_ring_mask_gen` schemas, meta/reference implementations and a Cadence C++ out kernel that writes packed `uint8` bits directly from token positions, sliding window and cache capacity. Keep the existing Python regressions and add seven public direct-call C++ unit tests for packed byte order and polarity, ring wrap, all windows on small caches, realistic cache sizes, `int32`/`int64` positions including `INT64_MAX`, empty inputs, invalid shapes/dtypes/windows/capacities and rejection of negative positions before writing. Wire the tests into the existing Buck and Cadence CMake test targets. This commit contains only ExecuTorch sources and synchronized mirrors; Jarvis registration remains in D126973553. AI assistance: Codex separated the history and added the public C++ unit tests and build wiring. The production kernel is unchanged by this test addition. Differential Revision: D126734014
f8e5665 to
24544d1
Compare
24544d1 to
f347ea7
Compare
Summary: Dense ring masks require an avoidable allocation and packing pass. Add `sdpa_bitwise_ring_mask_gen` schemas, meta/reference implementations and a Cadence C++ out kernel that writes packed `uint8` bits directly from token positions, sliding window and cache capacity. Keep the existing Python regressions and add seven public direct-call C++ unit tests for packed byte order and polarity, ring wrap, all windows on small caches, realistic cache sizes, `int32`/`int64` positions including `INT64_MAX`, empty inputs, invalid shapes/dtypes/windows/capacities and rejection of negative positions before writing. Wire the tests into the existing Buck and Cadence CMake test targets. This commit contains only ExecuTorch sources and synchronized mirrors; Jarvis registration remains in D126973553. AI assistance: Codex separated the history and added the public C++ unit tests and build wiring. The production kernel is unchanged by this test addition. Differential Revision: D126734014
d0aeceb to
0b63110
Compare
Summary: Dense ring masks require an avoidable allocation and packing pass. Add `sdpa_bitwise_ring_mask_gen` schemas, meta/reference implementations and a Cadence C++ out kernel that writes packed `uint8` bits directly from token positions, sliding window and cache capacity. Keep the existing Python regressions and add seven public direct-call C++ unit tests for packed byte order and polarity, ring wrap, all windows on small caches, realistic cache sizes, `int32`/`int64` positions including `INT64_MAX`, empty inputs, invalid shapes/dtypes/windows/capacities and rejection of negative positions before writing. Wire the tests into the existing Buck and Cadence CMake test targets. This commit contains only ExecuTorch sources and synchronized mirrors; Jarvis registration remains in D126973553. AI assistance: Codex separated the history and added the public C++ unit tests and build wiring. The production kernel is unchanged by this test addition. Differential Revision: D126734014
Summary: Dense ring masks require an avoidable allocation and packing pass. Add `sdpa_bitwise_ring_mask_gen` schemas, meta/reference implementations and a Cadence C++ out kernel that writes packed `uint8` bits directly from token positions, sliding window and cache capacity. Keep the existing Python regressions and add seven public direct-call C++ unit tests for packed byte order and polarity, ring wrap, all windows on small caches, realistic cache sizes, `int32`/`int64` positions including `INT64_MAX`, empty inputs, invalid shapes/dtypes/windows/capacities and rejection of negative positions before writing. Wire the tests into the existing Buck and Cadence CMake test targets. This commit contains only ExecuTorch sources and synchronized mirrors; Jarvis registration remains in D126973553. AI assistance: Codex separated the history and added the public C++ unit tests and build wiring. The production kernel is unchanged by this test addition. Differential Revision: D126734014
0b63110 to
9339d61
Compare
Summary: Dense ring masks require an avoidable allocation and packing pass. Add `sdpa_bitwise_ring_mask_gen` schemas, meta/reference implementations and a Cadence C++ out kernel that writes packed `uint8` bits directly from token positions, sliding window and cache capacity. Keep the existing Python regressions and add seven public direct-call C++ unit tests for packed byte order and polarity, ring wrap, all windows on small caches, realistic cache sizes, `int32`/`int64` positions including `INT64_MAX`, empty inputs, invalid shapes/dtypes/windows/capacities and rejection of negative positions before writing. Wire the tests into the existing Buck and Cadence CMake test targets. This commit contains only ExecuTorch sources and synchronized mirrors; Jarvis registration remains in D126973553. AI assistance: Codex separated the history and added the public C++ unit tests and build wiring. The production kernel is unchanged by this test addition. Reviewed By: mvartani-meta Differential Revision: D126734014
9339d61 to
4db6155
Compare
Summary: Dense ring masks require an avoidable allocation and packing pass. Add `sdpa_bitwise_ring_mask_gen` schemas, meta/reference implementations and a Cadence C++ out kernel that writes packed `uint8` bits directly from token positions, sliding window and cache capacity. Keep the existing Python regressions and add seven public direct-call C++ unit tests for packed byte order and polarity, ring wrap, all windows on small caches, realistic cache sizes, `int32`/`int64` positions including `INT64_MAX`, empty inputs, invalid shapes/dtypes/windows/capacities and rejection of negative positions before writing. Wire the tests into the existing Buck and Cadence CMake test targets. This commit contains only ExecuTorch sources and synchronized mirrors; Jarvis registration remains in D126973553. AI assistance: Codex separated the history and added the public C++ unit tests and build wiring. The production kernel is unchanged by this test addition. Reviewed By: mvartani-meta Differential Revision: D126734014
Summary: Dense ring masks require an avoidable allocation and packing pass. Add `sdpa_bitwise_ring_mask_gen` schemas, meta/reference implementations and a Cadence C++ out kernel that writes packed `uint8` bits directly from token positions, sliding window and cache capacity. Keep the existing Python regressions and add seven public direct-call C++ unit tests for packed byte order and polarity, ring wrap, all windows on small caches, realistic cache sizes, `int32`/`int64` positions including `INT64_MAX`, empty inputs, invalid shapes/dtypes/windows/capacities and rejection of negative positions before writing. Wire the tests into the existing Buck and Cadence CMake test targets. This commit contains only ExecuTorch sources and synchronized mirrors; Jarvis registration remains in D126973553. AI assistance: Codex separated the history and added the public C++ unit tests and build wiring. The production kernel is unchanged by this test addition. Reviewed By: mvartani-meta Differential Revision: D126734014
Summary:
Dense ring masks require an avoidable allocation and packing pass. Add
sdpa_bitwise_ring_mask_genschemas, meta/reference implementations and a Cadence C++ out kernel that writes packeduint8bits directly from token positions, sliding window and cache capacity. Keep the existing Python regressions and add seven public direct-call C++ unit tests for packed byte order and polarity, ring wrap, all windows on small caches, realistic cache sizes,int32/int64positions includingINT64_MAX, empty inputs, invalid shapes/dtypes/windows/capacities and rejection of negative positions before writing. Wire the tests into the existing Buck and Cadence CMake test targets. This commit contains only ExecuTorch sources and synchronized mirrors; Jarvis registration remains in D126973553.AI assistance: Codex separated the history and added the public C++ unit tests and build wiring. The production kernel is unchanged by this test addition.
Reviewed By: mvartani-meta
Differential Revision: D126734014