-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transition to physical addressing #477
Comments
Here are the regressions I got running on an Nvidia device: DATA ERROR
CRASH
FAILED
|
Thanks for posting this! Looks about the same as what I'm seeing at my end. |
I am working on those right now. |
I have started with Here is the kernel and the compiled version: https://godbolt.org/z/1Ejas96Yb The output is:
I have tried to inverse the two stores:
It is like only the second storing is taken into account, and the last index of the I have also tried to force @alan-baker , @kpet , any ideas? |
The shader looks ok to me. If you make the stores have thread dependent values (e.g. store |
Agree the shader looks correct after a quick scan. As tempting as it is to blame drivers, I am seeing failures across two Vulkan stacks and HW from 3 vendors (NVIDIA, Mesa/AMD, Mesa/Intel). clvk is definitely not allocating the memory properly, the code in main does not have some of the flags used in my original prototype ( |
Yes I have tried that, the writing occurs in the right thread. |
I've got the test passing, we're not laying out the structure but all structures in the PhysicalStorageBuffer storage class must be explicitly laid out. I've hacked clspv to test but a proper solution will require more work. There might be cases where the same struct type is used to declare objects in storages classes where they must be explicitly laid out and in others where they must not but the layout decorations are applied to the type so we need multiple types. I vaguely remember that there's logic to deal with this in clspv already. Happy to hand over to @alan-baker or @rjodinchr for a full clspv solution. |
Here's the clspv hack I used for reference: diff --git a/lib/SPIRVProducerPass.cpp b/lib/SPIRVProducerPass.cpp
index d39555e5..f1eb95bc 100644
--- a/lib/SPIRVProducerPass.cpp
+++ b/lib/SPIRVProducerPass.cpp
@@ -1918,9 +1918,9 @@ SPIRVID SPIRVProducerPassImpl::getSPIRVType(Type *Ty, bool needs_layout) {
StructType *canonical = cast<StructType>(CanonicalType(STy));
bool use_layout =
(Option::SpvVersion() < SPIRVVersion::SPIRV_1_4) || needs_layout;
- if (TypesNeedingLayout.idFor(STy) &&
+ if (/*TypesNeedingLayout.idFor(STy) &&
(canonical == STy || !TypesNeedingLayout.idFor(canonical)) &&
- use_layout) {
+ use_layout*/true) {
for (unsigned MemberIdx = 0; MemberIdx < STy->getNumElements();
MemberIdx++) {
// Ops[0] = Structure Type ID
|
I'll take a look, I would have thought this was handled already. |
See kpet/clvk#477 * Collect physical ssbo types that need a layout early in the producer
See kpet/clvk#477 * Collect physical ssbo types that need a layout early in the producer
I am working on the |
Physical addressing ought to become the default when available but we should reach parity wrt. logical addressing on the CTS before we transition. Once we land #453, we can start working on the following:
The text was updated successfully, but these errors were encountered: