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

Added ability to change legate options through LocalPreferences.toml #4

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

ejmeitz
Copy link
Owner

@ejmeitz ejmeitz commented Jan 4, 2025

Can now define a LocalPrefernces.toml which contains the legate command line args. This file is parsed in __init__ and pased to legate::start.

Example LocalPreferences.toml (should be in same directory as Project.toml). You need the use_local_prefs cause for some reason there's no way built in Preferences.jl to check if someone defined a LocalPrefernces.toml or we can just check manually I suppose.

[cuNumeric]
use_local_prefs = true
cpus = 10
gpus = 1

If there is no LocalPrefernces.toml the arguments passed when julia was called are passed to legate.

TODO

  • @krasow since your get_machine_info actually works, please try setting this and seeing if it changes what that prints out
  • check if you can dynamically change these (via some function) and restart legate with the new settings.
  • change CI to 1 CPU and 0 GPU, maybe that will fix it

@krasow
Copy link
Collaborator

krasow commented Jan 5, 2025

Screenshot 2025-01-05 at 4 49 31 pm

Even with a custom LocalPreferences, I am unable to change the output of cuNumeric.get_machine_info(). We are assuming that we can pass the same arguments from https://docs.nvidia.com/legate/latest/usage.html to legate::start(argc, argv) and cupynumeric::initialize(argc, argv). This assumption is confirmed here: https://github.com/nv-legate/cupynumeric/blob/5371ab3ead17c295ef05b51e2c424f62213ffd52/examples/cpp/stencil/stencil.cc#L82

@krasow krasow added enhancement New feature or request bug Something isn't working labels Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants