Releases: trpfrog/knock-on-gpus
Releases · trpfrog/knock-on-gpus
v0.1.0
BREAKING CHANGES
- Explicit Command Requirement by Default: By default,
knock-on-gpus
now requires an explicit command to be passed after specifying GPU devices. This change was made to prevent accidental execution of subsequent commands without the correctCUDA_VISIBLE_DEVICES
environment variable being set. The explicit command requirement ensures that users are aware of the command being executed in the context of available GPUs, enhancing the tool's usability and safety.
$ knock-on-gpus -d "0,1,2,3" -- sh -c 'echo "devices=$CUDA_VISIBLE_DEVICES"'
# => devices=0,1,2,3
If GPUs are available, this will succeed. "devices=0,1,2,3" will be printed.
$ knock-on-gpus && sh -c 'echo "devices=$CUDA_VISIBLE_DEVICES"'
# => ERROR: Omitting the command is not allowed.
Even if GPUs are available, this will fail because no command passed to knock-on-gpus
.
Note that &&
has no effect to pass the command to knock-on-gpus
.
$ knock-on-gpus --allow-noop && sh -c 'echo "devices=$CUDA_VISIBLE_DEVICES"'
# => devices=
If GPUs are available, this will succeed.
BUT "devices=" is printed instead of "devices=0,1,2,3" because sh -c ...
is not passed to knock-on-gpus
.
New
- No-Operation Mode Support (
--allow-noop
): We've added the--allow-noop
flag to allowknock-on-gpus
to be run without specifying a subsequent command. This enhancement addresses the need for flexibility in scenarios where users may want to initiateknock-on-gpus
without immediately executing a follow-up task. This can be particularly useful in workflows or scripts where the objective is to prepare or validate the GPU environment prior to deciding on the execution of further commands. The--allow-noop
option prevents the tool from raising an error when no command is provided, offering a smoother experience in such cases.
v0.0.2
v0.0.2 is out! Run this command to update.
pip install -U knock-on-gpus
Changes
- Add
--auto-select
option- This will automatically select the specified number of GPUs, avoiding GPUs that are in use
- Alias:
-a
,--auto
- Add alias
--device
for--devices
- Add
--verbose
option- This prints debug logs.
Full Changelog: v0.0.1...v0.0.2
v0.0.1
Initial Release.
This version is currently in alpha, implying it may contain bugs and does not yet include all features planned for future releases.
Please be aware that at this phase, we are not strictly following Semantic Versioning (semver), which means we might add new features in upcoming updates.