-
Notifications
You must be signed in to change notification settings - Fork 11
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
Different Android devices produce different results. #4
Comments
Hi @busiyg, thanks for your interest and the data you've collected. As your data suggests, this bug has been very difficult to reason about. I also don't have any Qualcomm devices myself, so it has been difficult for me to test fixes. With testing help from another user, I know that the issue is occuring somewhere in the multisplit key ranking here, but why it fails is still a mystery. What I do know is that it does not have anything to do with the wave/warp/subgroup size, as based on testing, the Qualcomm devices have chosen wave size 64 in every test I've run. I suspect that the issue is occuring somewhere in the transpilation from HLSL -> SPIR-V, but based on your data this might not even be the case. I will push one more attempted fix to my GaussianSplatting fork, but if it still does not work, I would suggest replacing DeviceRadixSort with the previous sort here. Please let me know if the fix works thanks! |
Hi,i try the update,and now the pico4 can't work properly,At first, it seems to work normally, but within a few seconds, the Gaussian splashes gradually decrease until only a few remain. the other devices also had old problem... |
Originally posted by @LeeSYSU in #3 (comment) |
I will try that, thanks. |
New patch. |
Same result bro. |
Some operators precedence is inconsistent on some platforms after transpilation from HLSL -> SPIR-V, I guess! 20240821_GaussianTest.mp4 |
Glad to see there might be some progress on this. Because the gaussian splats degrade over time and don't recover unless the gpu memory is reset, would this likely have something to do with a race condition, or the offset being out of sync? |
I tested this library using the following two devices ,build by Unity 6 Preview(6000.0.14f1 , il2cpp , .NetFramework)
vulkan info from this. |
Thanks you for this data. Would you happen to have an Adreno 6xx series GPU to test on? |
Hey @b0nes164, thank you for the awesome work. Any update on the bug solution? Looking into the code to help out, but asking in case there's more progress. |
I will test it. |
Hi @edhyah, could you link me to which commit of UnityGaussianSplatting you used in this comment here, as I just want to confirm which version you got these results on. As for helping with the code, one immediate thing you can do is try to see if you can replicate @LeeSYSU's results on your Meta Quest Pro: Update your project to Unity 6 Preview and see if it runs. Make sure to use the code on my fork of UnityGaussianSplatting repo though, just to be up to date with the fixes I've attempted. |
@b0nes164 I'm using commit b6c0dca from aras-p/UnityGaussianSplatting (v0.7) which leads to a black screen. I tried LeeSYSU's results (Unity 6 Preview, il2cpp, .NET framework), including the commit that they used (cf41aa9), but I still get disappearing splats on my Quest Pro and Quest 3. That being said... I did notice that the splats don't disappear when I'm using a much smaller scene (282k splats versus the original 1 million in the train scene). Maybe memory is being overwritten somehow? |
Hmm that is extremely wierd. As you noted in the other thread, the original thread author said that the Splatting ran fine with the older version that didn't use my sort. I also know for a fact that my sort is breaking when run on Adreno 650.
A smaller buffer size working correctly seems to suggest an OOB error on one of the buffers, but from testing in isolation I haven't seen OOB issues. All the issues point to the multispltting not correctly being counted on the Adreno chips. |
Ok, so after encountering a very similar issue when coding in GLSL, I'm pretty sure I figured out whats going on. The issue is not in the transpilation from HLSL->SPIRV, but an issue with SPIRV itself pre SPIRV-1.6. To quote David Neto's response from this issue thread here:
Basically, on Quallcomm devices, the wave/subgroup size can vary between 64 and 128. However in pre Vulkan1.3/SPIRV-1.6, My testing did not catch this because I did the majority of my testing D3D12/HLSL, and in HLSL, I'm not aware of a way of specifying a shader compilation target in Unity, so we can't target SPIRV-1.6. Instead, we get the correct wave size by counting the bits from @edhyah or @LeeSYSU could you test this patch? The specific Unity version does not matter. |
@b0nes164 where is this patch available to test? |
@sam598 https://github.com/b0nes164/UnityGaussianSplatting I'll try it out later tonight. Thanks in advance for your awesome work! |
Hi @tangxianbo are you sure the issue is specifically from the sorting? There are other issues that may be causing crashing unrelated to the sort, and I cannot tell from this screenshot what is happening. |
Hi @b0nes164 , there was no problem when I used the original version https://github.com/aras-p/UnityGaussianSplatting. |
@tangxianbo That makes a lot of sense now, thanks for the info. |
Hi @b0nes164 , when I use unity 6000.0.20f1, this error is gone. |
Hi @b0nes164 As no one seemed to have chimed in here so far, I can sadly report that your current changes do not fix the sorting issues on a Meta Quest Pro / Adreno 650. Tried your repo at https://github.com/b0nes164/UnityGaussianSplatting with current Unity 2023.3 and Unity 6, and both still have the disappearing splats issue. I am not sure if it's related, but compared to your sort on other devices, where there is very little jitter in runtimes, and also compared to FFX sort on the Quest Pro, I am seeing massive performance drops every few seconds. Might be the Quest being weird though. |
Hi @ninjamode, thanks for the updates. I'm still not 100% if my fix from last month even works correctly on Quallcomm, but another issue could be subgroup convergence, which is a whole other bag of worms. The overriding issue is that even though the latest Unity version has access to Vulkan 1.3, which has all the nice extensions that could possibly adress this issue, I'm not sure if Unity exposes access to them. |
Hey @b0nes164 I'm currently testing your DeviceRadixSort (from GPUSorting, not UnityGaussianSplatting) where my Unity editor (2022.3.37f1) is running on a MacOS (specifically Macbook M3 Pro), deploying to a Meta Quest 3. What I ran into:
If you had any additional insight or pointers in the right direction that would be amazing. Happy to test any new code / dev branches / pull any diagnostics that could help. |
Maybe I found that bug. You need to place |
I am unsure if I correctly understand what this change does, but I can confirm the change proposed by @hyoteis makes the sort work correctly on a Quest 3. Thanks! |
Hello, thank you for your work. I conducted tests in your repository, and the results differ on various Android devices. I have some comparison results and would like to understand where the specific issue lies.
i use this project: https://github.com/b0nes164/UnityGaussianSplatting
And i use Vulkan api to build android apk
device1 (pico 4):https://vulkan.gpuinfo.org/displayreport.php?id=22263
Works properly
device2 (quest pro):https://vulkan.gpuinfo.org/displayreport.php?id=32037
At first, it seems to work normally, but within a few seconds, the Gaussian splashes gradually decrease until only a few remain.
device3 (xiaomi pad 6):https://vulkan.gpuinfo.org/displayreport.php?id=27171
The Gaussian splashes never appeared.
They both have the Adreno™ 650 GPU, yet the results are different. Could you provide some suggestions? Thank you.
The text was updated successfully, but these errors were encountered: