-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
[opengl] random use different seed in each launch #692
Conversation
Thanks! I'll test it on my end. Meanwhile, let's finish #666 first so that we get rid of the redundant commits. |
We may also want to add a test case for this, to check if @ti.kernel
def func(i: ti.i32):
x[i] = ti.random()
for i in range(5):
func(i)
assert x[i] != x[i - 1] |
This might be a brittle test since there's a tiny probability that |
[skip ci] fix access out of bound in test_random
That's amazing! Couldn't believe we are now faster than CUDA! Does this mean that CUDA still has lot of space of optimizations to be done? Or simply OpenGL is really better than CUDA? |
I guess it's because CUDA is not yet fully optimized (and the OpenGL backend is well done). I haven't got a chance to work on it. |
Seems #603 is just 杞人忧天ing... the performance of current OpenGL backend is really utilized now. |
#603 says:
In fact I found sync is only costly on mesa one, not NV, maybe their GPUs have really faster communication with CPU? |
I guess it's because the NVIDIA driver is better implemented than mesa for NVIDIA GPUs. |
Could you also test |
I have to change |
I updated https://github.com/taichi-dev/taichi/pull/692/files#diff-733c00d9e85a14e095b788b8b985e75c Btw do you want to fix the memory leakage here? If not I'll go merge this PR. |
Sounds a serious issue, good luck!
No, let's just keep this PR small and trackable :) |
Cool, thanks. Merging this in now... |
So that
examples/sdf_renderer.py
works.Related issue = #492
[Click here for the format server]