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

ENH: env variable for execution space #190

Open
tylerjereddy opened this issue Mar 24, 2023 · 1 comment
Open

ENH: env variable for execution space #190

tylerjereddy opened this issue Mar 24, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@tylerjereddy
Copy link
Contributor

Currently we have an example module: examples/ExaMiniMD/src/examinimd.py that does this:

        ...
        space: Optional[str] = os.environ.get("PK_EXA_SPACE")
        if space is not None:
            pk.set_default_space(pk.ExecutionSpace(space))

I think it would be helpful to have an "endorsed"/official way to use environment variables to swap between execution spaces instead of rolling custom code each time.

This may be particularly relevent to python runtests.py ..., because it is not particularly convenient to manually add shim code to swap the execution space if you want to test our current status on GPUs without most of the code running on the host.

If we can't agree on something for the main library, I'd at least want to see runtests.py capable of doing this.

Something similar for enabling/disabling UVM may also be useful, though perhaps not quite as fundamentally important as testing an entire execution space to start.

@tylerjereddy tylerjereddy added the enhancement New feature or request label Mar 24, 2023
@JBludau
Copy link
Contributor

JBludau commented Mar 25, 2023

Something similar for enabling/disabling UVM may also be useful, though perhaps not quite as fundamentally important as testing an entire execution space to start.

Sidenote: the classic enable uvm which makes CudaUVM aliasing CudaSpace is gone with Kokkos 4.0. Nevertheless, there is SharedSpace introduced which also works for Hip an SYCL ...

Maybe we should think about something like pk.setup with defaults or stuff being read to from the env when pykokkos is loaded. This way it can still be changed for individual scripts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants