preallocate CUDA memory for pytorch
Project description
Preallocate CUDA memory for pytorch
This is a code that helps preallocate memory for PyTorch, used for competing for computational resources with others.
You can use the following command directly on the command line:
python -m preallocate_cuda_memory
Or you can use in python file:
import preallocate_cuda_memory as pc
mc = pc.MemoryController(0) # 0 is the GPU index
mc.occupy_all_available_memory()
mc.free_memory()
If you find any issues, please feel free to contact the author by raising an issue on GitHub.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file preallocate_cuda_memory-1.0.0.tar.gz.
File metadata
- Download URL: preallocate_cuda_memory-1.0.0.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c804d46ddb4bd6d27190df48501a2ef8b8cd51762b6c4938ae7fc79858a50ddf
|
|
| MD5 |
6853afbdb2aa3637d167b593b9033084
|
|
| BLAKE2b-256 |
23809223e5a819003c5985d4465fccb484900fb361b2d1742313412b8354403b
|
File details
Details for the file preallocate_cuda_memory-1.0.0-py3-none-any.whl.
File metadata
- Download URL: preallocate_cuda_memory-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94531ea88b54852f4dad6aebd4a907b764ace5c2dae9db75061d107ab84bf2d6
|
|
| MD5 |
c432779026de4a43a2d4f4ad40550530
|
|
| BLAKE2b-256 |
44492b9b732c13b8ceb86621589024dbcd9666d22d1ad77c5b4493c814f84f41
|