Skip to content

cpfy/swalot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

badge-pypi badge-python badge-license

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")

🗓️ Schedule

  • Enable GPU protect mode with decorator
  • Support multiple GPU environment

About

A Python Libray to swallow the GPU card

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages