-
Notifications
You must be signed in to change notification settings - Fork 569
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle CUDA version modifiers on torch (#1876)
* Handle CUDA version modifiers on torch * If we get given a torch with a cuda version modifier such as 2.0.3+cu118 we fail if we do not explicitly support this version. * Instead extract the CUDA version from the version tag (11.8) and perform our cuda compatibility lookup with those 2 versions. * Update pkg/config/compatibility_test.go Co-authored-by: Mattt <[email protected]> Signed-off-by: Will Sackfield <[email protected]> * Update pkg/config/compatibility.go Co-authored-by: Mattt <[email protected]> Signed-off-by: Will Sackfield <[email protected]> * Fix indentation --------- Signed-off-by: Will Sackfield <[email protected]> Signed-off-by: Will Sackfield <[email protected]> Co-authored-by: Mattt <[email protected]>
- Loading branch information
Showing
5 changed files
with
76 additions
and
0 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
6 changes: 6 additions & 0 deletions
6
test-integration/test_integration/fixtures/torch-cuda-baseimage-project/cog.yaml
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
build: | ||
gpu: true | ||
python_version: "3.9" | ||
python_packages: | ||
- "torch==2.0.1+cu118" | ||
predict: "predict.py:Predictor" |
6 changes: 6 additions & 0 deletions
6
test-integration/test_integration/fixtures/torch-cuda-baseimage-project/predict.py
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from cog import BasePredictor | ||
|
||
|
||
class Predictor(BasePredictor): | ||
def predict(self, s: str) -> str: | ||
return "hello " + s |
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