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

Allow task tuning within the same process #451

Closed
GregoryKimball opened this issue Aug 31, 2024 · 1 comment · Fixed by #454
Closed

Allow task tuning within the same process #451

GregoryKimball opened this issue Aug 31, 2024 · 1 comment · Fixed by #454

Comments

@GregoryKimball
Copy link

When benchmarking with the KVIKIO_TASK_SIZE and KVIKIO_NTHREADS, I observed that changes to these variable don't seem to take effect if kvikIO has already been initialized in a process. For instance, if I loop over KVIKIO_NTHREADS in python, all of the reads seem to use the default values. However, if I set KVIKIO_TASK_SIZE and KVIKIO_NTHREADS before launching the python process, then they appear to work as intended.

Is it possible for KVIKIO_TASK_SIZE and KVIKIO_NTHREADS to be updated dynamically within a process?

@wence-
Copy link
Contributor

wence- commented Sep 2, 2024

You should use the programmatic interface rather than relying on environment variables:

import kvikio.defaults

kvikio.defaults.num_threads_reset(required_number_of_threads)

kvikio.defaults.task_size_reset(required_task_size)

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