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

[FEA] Dim3 should act more like a NamedTuple #55

Open
gmarkall opened this issue Oct 18, 2024 · 1 comment
Open

[FEA] Dim3 should act more like a NamedTuple #55

gmarkall opened this issue Oct 18, 2024 · 1 comment
Labels
feature request New feature or request
Milestone

Comments

@gmarkall
Copy link
Collaborator

E.g. It would be convenient to be able to do things like

tuple(g * d for g, d in zip(cuda.gridDim, cuda.blockDim))

which is not presently possible with the current implementation of Dim3.

cc @brycelelbach

@gmarkall gmarkall added the feature request New feature or request label Oct 18, 2024
@brycelelbach
Copy link
Contributor

Something like this works today:

from numba import cuda

@cuda.jit
def kernel():
  for g, d in zip((4, 1, 1), (256, 1, 1)):
    print(g * d)

kernel[1, 1]()

But it won't work with Dim3s, because they're not iterable.

@gmarkall gmarkall added this to the v0.0.19 milestone Oct 21, 2024
@gmarkall gmarkall modified the milestones: v0.0.20, v0.0.21, v0.0.22 Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants