-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
917 additions
and
720 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,19 @@ | ||
cupy_run = False | ||
try: | ||
import cupy as cp | ||
import nvtx | ||
|
||
try: | ||
cp.cuda.Device(0).compute_capability | ||
cupy_run = True | ||
except cp.cuda.runtime.CUDARuntimeError: | ||
print("CuPy library is a major dependency for HTTomolibgpu, please install") | ||
import numpy as cp | ||
except ImportError: | ||
import numpy as cp | ||
except ImportError as e: | ||
print( | ||
f"Failed to import module in {__file__} with error: {e}; defaulting to CPU-only mode" | ||
) | ||
from unittest.mock import Mock | ||
import numpy as cp | ||
|
||
nvtx = Mock() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.