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

Top-level statement has no effect on execution of user code? #167

Closed
vchuravy opened this issue Sep 23, 2024 · 1 comment · Fixed by #169
Closed

Top-level statement has no effect on execution of user code? #167

vchuravy opened this issue Sep 23, 2024 · 1 comment · Fixed by #169

Comments

@vchuravy
Copy link

I just noticed these two lines:

CUDA.allowscalar(false) # disallow scalar operations on GPU

AMDGPU.allowscalar(false) # disallow scalar operations on GPU

Since precompilation executes top-level statements in isolated processes they have no effect?

Similarly the __init__ codes would break some use-cases, (like creating a docker container with a precompilation cache and loading it on a GPU enabled machine later)

@b-fg
Copy link
Member

b-fg commented Sep 23, 2024

Ah, maybe we did not notice because these are the default options anyways? I have seen the scalar-indexing error correctly popping up when looping through a GPU array outside of a kernel. What would be better solution if these cannot be included in __init__? Since false is already the default flag, we could just delete them I guess?

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

Successfully merging a pull request may close this issue.

2 participants