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.
Metadata
Release files for preallocate-cuda-memory 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| preallocate_cuda_memory-1.0.0.tar.gz | 3.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| preallocate_cuda_memory-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.3 kB
Release files / preallocate_cuda_memory-1.0.0.tar.gz
| Download URL | preallocate_cuda_memory-1.0.0.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c804d46ddb4bd6d27190df48501a2ef8b8cd51762b6c4938ae7fc79858a50ddf
|
|
BLAKE2b-256 checksum How to use checksums |
23809223e5a819003c5985d4465fccb484900fb361b2d1742313412b8354403b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.14
|
Release files / preallocate_cuda_memory-1.0.0-py3-none-any.whl
| Download URL | preallocate_cuda_memory-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
94531ea88b54852f4dad6aebd4a907b764ace5c2dae9db75061d107ab84bf2d6
|
|
BLAKE2b-256 checksum How to use checksums |
44492b9b732c13b8ceb86621589024dbcd9666d22d1ad77c5b4493c814f84f41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.14
|