Skip to content

Commit

Permalink
Revert "update to_gpu"
Browse files Browse the repository at this point in the history
This reverts commit a8489bb.
  • Loading branch information
konas122 committed May 4, 2024
1 parent 5d3c365 commit 6182a28
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 979 deletions.
3 changes: 0 additions & 3 deletions dazero/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import numpy as np

import dazero
import dazero.cuda


class Config:
Expand Down Expand Up @@ -174,8 +173,6 @@ def to_cpu(self):
self.data = dazero.cuda.as_numpy(self.data)

def to_gpu(self):
if dazero.cuda.gpu_enable == False:
return
if self.data is not None:
self.data = dazero.cuda.as_cupy(self.data)

Expand Down
3 changes: 0 additions & 3 deletions dazero/dataloaders.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ def to_cpu(self):
self.gpu = False

def to_gpu(self):
if cuda.gpu_enable == False:
self.gpu = False
return
self.gpu = True


Expand Down
2 changes: 0 additions & 2 deletions dazero/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ def to_cpu(self):
param.to_cpu()

def to_gpu(self):
if cuda.gpu_enable == False:
return
for param in self.params():
param.to_gpu()

Expand Down
592 changes: 0 additions & 592 deletions examples/Diffusion/diffusion.ipynb

This file was deleted.

90 changes: 0 additions & 90 deletions examples/Diffusion/modules/diffusion.py

This file was deleted.

46 changes: 0 additions & 46 deletions examples/Diffusion/modules/sampler.py

This file was deleted.

69 changes: 0 additions & 69 deletions examples/Diffusion/modules/trainer.py

This file was deleted.

150 changes: 0 additions & 150 deletions examples/Diffusion/modules/unet.py

This file was deleted.

Loading

0 comments on commit 6182a28

Please sign in to comment.