Skip to content

test(vulkan): honor storage buffer offset alignment - #183

Merged
SnowCheetos merged 1 commit into
mainfrom
codex/pr-182-vulkan
Sep 3, 2026
Merged

test(vulkan): honor storage buffer offset alignment#183
SnowCheetos merged 1 commit into
mainfrom
codex/pr-182-vulkan

Conversation

@Colin-Hayes

@Colin-Hayes Colin-Hayes commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • use the existing 4096-byte test alignment for nonzero Vulkan storage-buffer descriptor offsets
  • retain sentinel coverage before and after the bound tensor range
  • rename the test to describe aligned offset binding instead of nonexistent multi-workgroup coverage

Why

The Qualcomm Adreno X1-45 driver reports minStorageBufferOffsetAlignment = 64. The previous test bound an eight-element FP32 tensor at byte offset 32, so the backend correctly rejected the submission as incompatible before dispatch. Intel ANV's less restrictive alignment did not expose the test assumption.

This PR is stacked on #182 and targets its vulkan/ffi-8 branch.

Validation

On Qualcomm Adreno X1-45 GPU, Vulkan 1.3.295, Windows ARM64:

cargo fmt --check
$env:VIRTIO_ACCEL_VULKAN = "1"
cargo clippy -p virtio-accel-vulkan --all-targets -- -D warnings
$env:VIRTIO_ACCEL_VULKAN_REQUIRE_DEVICE = "1"
cargo test -p virtio-accel-vulkan -- --nocapture

The Vulkan crate suite passes: 30 tests passed, 0 failed, and the manual performance test remains ignored.

SnowCheetos
SnowCheetos previously approved these changes Sep 3, 2026
stack merge was automatically disabled September 3, 2026 21:47

Pull Request is not mergeable

@SnowCheetos
SnowCheetos dismissed stale reviews from micro-perceptron and themself September 3, 2026 22:08

The merge-base changed after approval.

Copilot AI lite review requested due to automatic review settings September 3, 2026 22:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

The change is confined to test logic, aligns descriptor offsets to avoid known Vulkan driver constraints, and preserves/strengthens the existing guard-region assertions.

Pull request overview

This PR updates the Vulkan integration test suite to ensure storage-buffer descriptor bindings use a nonzero offset that is aligned to Vulkan’s minStorageBufferOffsetAlignment, preventing spurious backend rejections on stricter drivers (e.g., Qualcomm Adreno) and renaming the test to match its actual coverage.

Changes:

  • Rename the test to reflect aligned offset binding coverage rather than multi-workgroup behavior.
  • Bind input/output storage buffers at a nonzero, aligned byte offset and size buffers to include guard regions.
  • Preserve sentinel verification before and after the bound tensor range while writing/reading with the new offset.
File summaries
File Description
crates/virtio-accel-vulkan/tests/vulkan.rs Updates the offset-binding test to use aligned nonzero descriptor offsets with padded buffers and sentinel checks.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Base automatically changed from vulkan/ffi-8 to main September 3, 2026 22:23
@SnowCheetos SnowCheetos added the area: backend Accelerator traits, mock backend, and provider conformance label Sep 3, 2026
@SnowCheetos
SnowCheetos merged commit 398e2ca into main Sep 3, 2026
18 checks passed
@SnowCheetos
SnowCheetos deleted the codex/pr-182-vulkan branch September 3, 2026 22:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: backend Accelerator traits, mock backend, and provider conformance

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants