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

Dynamically pull GPU parameters #2

Open
notnotnotveg opened this issue Jul 29, 2021 · 0 comments
Open

Dynamically pull GPU parameters #2

notnotnotveg opened this issue Jul 29, 2021 · 0 comments
Labels
good first issue Good for newcomers

Comments

@notnotnotveg
Copy link
Collaborator

Currently, the program has hardcoded max grid and block dimensions.

However, this should be dynamically pulled, to support different GPU architectures.

As an example,

from numba import cuda
device = cuda.get_current_device()
print("name = %s" % device.name)
print("maxThreadsPerBlock = %s" % str(device.MAX_THREADS_PER_BLOCK))
print("maxBlockDimX = %s" % str(device.MAX_BLOCK_DIM_X))
print("maxBlockDimY = %s" % str(device.MAX_BLOCK_DIM_Y))
print("maxBlockDimZ = %s" % str(device.MAX_BLOCK_DIM_Z))
print("maxGridDimX = %s" % str(device.MAX_GRID_DIM_X))
print("maxGridDimY = %s" % str(device.MAX_GRID_DIM_Y))
print("maxGridDimZ = %s" % str(device.MAX_GRID_DIM_Z))
@notnotnotveg notnotnotveg added the good first issue Good for newcomers label Jul 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant