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

ti.random is not random on Vulkan on macOS #7645

Open
jarmitage opened this issue Mar 23, 2023 · 1 comment
Open

ti.random is not random on Vulkan on macOS #7645

jarmitage opened this issue Mar 23, 2023 · 1 comment
Assignees

Comments

@jarmitage
Copy link

jarmitage commented Mar 23, 2023

Relevant docs: https://docs.taichi-lang.org/docs/global_settings#runtime

To set a custom seed for the random number generator used by ti.random(): ti.init(random_seed=seed). seed should be an integer. An example: ti.init(random_seed=int(time.time())).

import time
import taichi as ti
ti.init(arch=ti.vulkan,random_seed=int(time.time()))
@ti.kernel
def main() -> ti.f32:
    return ti.random(ti.f32)
print(main())
➜  test.py
[Taichi] version 1.6.0, llvm 16.0.0git, commit 1fc985e3, osx, python 3.10.6
[Taichi] Starting on arch=vulkan
RHI Error: Potential non-conformant Vulkan implementation, enabling VK_KHR_portability_subset
0.7819478511810303
➜  test.py
[Taichi] version 1.6.0, llvm 16.0.0git, commit 1fc985e3, osx, python 3.10.6
[Taichi] Starting on arch=vulkan
RHI Error: Potential non-conformant Vulkan implementation, enabling VK_KHR_portability_subset
0.7819478511810303
➜  test.py
[Taichi] version 1.6.0, llvm 16.0.0git, commit 1fc985e3, osx, python 3.10.6
[Taichi] Starting on arch=vulkan
RHI Error: Potential non-conformant Vulkan implementation, enabling VK_KHR_portability_subset
0.7819478511810303

macOS 12.6 (21G115), M1

@github-project-automation github-project-automation bot moved this to Untriaged in Taichi Lang Mar 23, 2023
@jarmitage jarmitage changed the title ti.random is not random on Vulkan ti.random is not random on Vulkan on macOS Mar 23, 2023
@neozhaoliang neozhaoliang moved this from Untriaged to Todo in Taichi Lang Mar 24, 2023
@lin-hitonami lin-hitonami moved this from Todo to Backlog in Taichi Lang Apr 14, 2023
@burhanuddin6
Copy link

This issue is also on the cpu

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

No branches or pull requests

3 participants