-
Notifications
You must be signed in to change notification settings - Fork 5
Jenkins setup - GPU testing framework #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,16 @@ | ||
| FROM nvidia/cuda:12.0.0-devel-ubuntu20.04 | ||
|
|
||
| # julia | ||
| RUN apt-get update && \ | ||
| DEBIAN_FRONTEND=noninteractive \ | ||
| apt-get install --yes --no-install-recommends \ | ||
| # basic stuff | ||
| curl ca-certificates \ | ||
| libcutensor-dev \ | ||
| && \ | ||
| apt-get clean && \ | ||
| rm -rf /var/lib/apt/lists/* | ||
|
|
||
| ARG JULIA=1.6 | ||
| RUN curl -s -L https://julialang-s3.julialang.org/bin/linux/x64/${JULIA}/julia-${JULIA}-latest-linux-x86_64.tar.gz | \ | ||
| tar -C /usr/local -x -z --strip-components=1 -f - | ||
This file contains hidden or 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,61 @@ | ||
| pipeline { | ||
| agent none | ||
| options { | ||
| disableConcurrentBuilds() | ||
| buildDiscarder(logRotator(numToKeepStr: '8', daysToKeepStr: '20')) | ||
| } | ||
| stages { | ||
| stage('GPU Testing') { | ||
| parallel { | ||
| stage('MatrixAlgebraKitCUDAExt julia-lts') { | ||
| options { | ||
| timeout(time: 45, unit: 'MINUTES') | ||
| } | ||
| agent { | ||
| dockerfile { | ||
| label 'gpu&&v100' | ||
| filename 'Dockerfile' | ||
| dir 'jenkins' | ||
| additionalBuildArgs '--build-arg JULIA=1.10' | ||
| args '--gpus "device=1"' | ||
| } | ||
| } | ||
| environment { | ||
| HOME = pwd(tmp:true) | ||
| OMP_NUM_THREADS = 4 | ||
| JULIA_NUM_THREADS = 4 | ||
| } | ||
| steps { | ||
| sh ''' | ||
| julia --project=. -e 'using Pkg: Pkg; Pkg.test("MatrixAlgebraKit"; test_args=["--group=cuda"])' | ||
| ''' | ||
| } | ||
| } | ||
| stage('MatrixAlgebraKitCUDAExt julia-1') { | ||
| options { | ||
| timeout(time: 45, unit: 'MINUTES') | ||
| } | ||
| agent { | ||
| dockerfile { | ||
| label 'gpu&&v100' | ||
| filename 'Dockerfile' | ||
| dir 'jenkins' | ||
| additionalBuildArgs '--build-arg JULIA=1.11' | ||
| args '--gpus "device=1"' | ||
| } | ||
| } | ||
| environment { | ||
| HOME = pwd(tmp:true) | ||
| OMP_NUM_THREADS = 4 | ||
| JULIA_NUM_THREADS = 4 | ||
| } | ||
| steps { | ||
| sh ''' | ||
| julia --project=. -e 'using Pkg: Pkg; Pkg.test("MatrixAlgebraKit"; test_args=["--group=cuda"])' | ||
| ''' | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } |
This file contains hidden or 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,3 @@ | ||
| println("hello") | ||
| @test true | ||
| using CUDA |
This file contains hidden or 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,43 +1,64 @@ | ||
| using SafeTestsets | ||
|
|
||
| @safetestset "Truncate" begin | ||
| include("truncate.jl") | ||
| end | ||
| @safetestset "QR / LQ Decomposition" begin | ||
| include("qr.jl") | ||
| include("lq.jl") | ||
| end | ||
| @safetestset "Singular Value Decomposition" begin | ||
| include("svd.jl") | ||
| end | ||
| @safetestset "Hermitian Eigenvalue Decomposition" begin | ||
| include("eigh.jl") | ||
| end | ||
| @safetestset "General Eigenvalue Decomposition" begin | ||
| include("eig.jl") | ||
| end | ||
| @safetestset "Schur Decomposition" begin | ||
| include("schur.jl") | ||
| end | ||
| @safetestset "Polar Decomposition" begin | ||
| include("polar.jl") | ||
| end | ||
| @safetestset "Image and Null Space" begin | ||
| include("orthnull.jl") | ||
| end | ||
| @safetestset "ChainRules" begin | ||
| include("chainrules.jl") | ||
| const pat = r"(?:--group=)(\w+)" | ||
| arg_id = findfirst(contains(pat), ARGS) | ||
| const GROUP = if isnothing(arg_id) | ||
| uppercase(get(ENV, "GROUP", "ALL")) | ||
| else | ||
| uppercase(only(match(pat, ARGS[arg_id]).captures)) | ||
| end | ||
|
|
||
| @safetestset "MatrixAlgebraKit.jl" begin | ||
| @safetestset "Code quality (Aqua.jl)" begin | ||
| using MatrixAlgebraKit | ||
| using Aqua | ||
| Aqua.test_all(MatrixAlgebraKit) | ||
| @time begin | ||
| if GROUP == "ALL" || GROUP == "DECOMPOSITIONS" | ||
| @safetestset "Truncate" begin | ||
| include("truncate.jl") | ||
| end | ||
| @safetestset "QR / LQ Decomposition" begin | ||
| include("qr.jl") | ||
| include("lq.jl") | ||
| end | ||
| @safetestset "Singular Value Decomposition" begin | ||
| include("svd.jl") | ||
| end | ||
| @safetestset "Hermitian Eigenvalue Decomposition" begin | ||
| include("eigh.jl") | ||
| end | ||
| @safetestset "General Eigenvalue Decomposition" begin | ||
| include("eig.jl") | ||
| end | ||
| @safetestset "Schur Decomposition" begin | ||
| include("schur.jl") | ||
| end | ||
| @safetestset "Polar Decomposition" begin | ||
| include("polar.jl") | ||
| end | ||
| @safetestset "Image and Null Space" begin | ||
| include("orthnull.jl") | ||
| end | ||
| end | ||
|
|
||
| if GROUP == "ALL" || GROUP == "ChainRules" | ||
| @safetestset "ChainRules" begin | ||
| include("chainrules.jl") | ||
| end | ||
| end | ||
| @safetestset "Code linting (JET.jl)" begin | ||
| using MatrixAlgebraKit | ||
| using JET | ||
| JET.test_package(MatrixAlgebraKit; target_defined_modules=true) | ||
|
|
||
| if GROUP == "ALL" || GROUP == "CUDA" | ||
| @safetestset "CUDA" begin | ||
| include("cuda.jl") | ||
| end | ||
| end | ||
|
|
||
| if GROUP == "ALL" || GROUP == "UTILITY" | ||
| @safetestset "Code quality (Aqua.jl)" begin | ||
| using MatrixAlgebraKit | ||
| using Aqua | ||
| Aqua.test_all(MatrixAlgebraKit) | ||
| end | ||
| @safetestset "Code linting (JET.jl)" begin | ||
| using MatrixAlgebraKit | ||
| using JET | ||
| JET.test_package(MatrixAlgebraKit; target_defined_modules=true) | ||
| end | ||
| end | ||
| end |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean Julia v1.6. Is that what we want?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still working on getting this ironed out, I think this is only the default value and this is actually replaced in the Jenkinsfile. This is mostly just copied from the ITensors.jl repository and doesn't currently work yet.