Skip to content

Conversation

@swolchok
Copy link
Contributor

Summary

It looks like we are careful to use only copy_from and copy_to with StagingBuffer on CPU, in which case we only need SEQUENTIAL_WRITE.
This matters on Raspberry Pi 5, where there appears (from debugging) to be only one memory type; that type is HOST_VISIBLE and HOST_COHERENT but not HOST_CACHED.
This is my first time working with Vulkan, so please be critical.

Test plan

Followed vulkan README.md vk_add example on Raspberry Pi 5; was failing with vmaCreateBuffer returned -8 and now succeeds.

@pytorch-bot
Copy link

pytorch-bot bot commented Jan 11, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/7615

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 3fd4ee4 with merge base bfebce1 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 11, 2025
@swolchok
Copy link
Contributor Author

https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/usage_patterns.html recommends doing this for staging data to send to the GPU. It's not immediately clear to me whether we also rely on the "readback" usage pattern mentioned later on.

@swolchok swolchok merged commit 690f713 into main Jan 13, 2025
44 checks passed
@swolchok swolchok deleted the vulkan-sequential branch January 13, 2025 21:09
YIWENX14 pushed a commit that referenced this pull request Jan 28, 2025
…T, not RANDOM (#7615)

* [ET-VK] Request VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT, not RANDOM

* fix lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants