No CUDA out of memory again; fully use of a GPU card per user.
Project description
Installation
Install the package using pip:
pip install swalot
If you are using pip mirror, you may get error logs such as "No matching distribution found.." Try using pypi as the installation source:
pip install swalot -i https://pypi.python.org/simple
Usage
Simply import and wrap training code:
import swalot as sw
with sw.gpu():
"""
use CUDA tensor calculation here as usual.
All RAM will be protected automatically!
e.g.
"""
# a = torch.randn(1000, 1000, 600).cuda()
# a = torch.randn(1000, 1000, 600).to("cuda:0")
# a = torch.randn(1000, 1000, 600, device="cuda:0")
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
swalot-0.0.3.post1.tar.gz
(5.9 kB
view details)
File details
Details for the file swalot-0.0.3.post1.tar.gz.
File metadata
- Download URL: swalot-0.0.3.post1.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7477a3b4f7dfa4c556c82355deea70ede3eea81fd0fcf07f9bfa15399ec8f000
|
|
| MD5 |
2800f3fcf5ac374587a457e7bb0dc460
|
|
| BLAKE2b-256 |
53592b3596f94992fc13a37d09e9e55021f6285e884829ced1bc5a1c56bace07
|