Skip to content
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

GPU diverges from CPU on PTMaintLayer nmda computation #237

Open
rcoreilly opened this issue Jun 4, 2023 · 2 comments
Open

GPU diverges from CPU on PTMaintLayer nmda computation #237

rcoreilly opened this issue Jun 4, 2023 · 2 comments

Comments

@rcoreilly
Copy link
Member

even when using the same mat32.FastExp implementation, the Gnmda values diverge between GPU and CPU.

Run the TestStdGPUnData1Debug test in examples/boa (set TEST_DEBUG=true to enable) to see these divergences. I verified in the GUI that the divergence emerges over cycles specifically in the Gnmda current (use Plot Unit value with cycle-level raster recording to see).

for testing, it would be great to fix this..

@rcoreilly
Copy link
Member Author

This is not due to FastExp -- added a compute test for this in vgpu, and it is identical.

@rcoreilly
Copy link
Member Author

old but informative: https://randomascii.wordpress.com/2013/07/16/floating-point-determinism/

MoltenVK (Mac) has -fast-math enabled by default, unless somehow an individual shader indicates SignedZeroInfNanPreserve execution mode has been specified. I can't seem to figure out how that might happen.

There is a property here saying whether supported: https://registry.khronos.org/vulkan/specs/1.3-extensions/man/html/VkPhysicalDeviceFloatControlsPropertiesKHR.html

KhronosGroup/MoltenVK#1691 -- moltenvk supports it

just no hits anywhere about how to convince dxc to do it -- the -Gis option complains that it is not supported in spirv mode.

also don't see any obvious option in glslc.

giving up on this path for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant