Skip to content

Commit

Permalink
Update kite pipeline and use artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt committed Mar 28, 2022
1 parent bb4fecf commit 1e37f18
Show file tree
Hide file tree
Showing 4 changed files with 123 additions and 4 deletions.
44 changes: 44 additions & 0 deletions .buildkite/pipeline.yml
Expand Up @@ -197,6 +197,50 @@ steps:
if: build.message !~ /\[skip benchmarks\]/ &&
build.branch =~ /^master$$/
timeout_in_minutes: 240

- label: "CUSTATEVEC"
plugins:
- JuliaCI/julia#v1:
version: 1.6
- JuliaCI/julia-test#v1: ~
- JuliaCI/julia-coverage#v1:
codecov: true
dirs:
- src
- lib
- examples
agents:
queue: "juliagpu"
cuda: "11.0"
cap: "sm_80"
package: "CUSTATEVEC.jl"
env:
JULIA_CUDA_VERSION: '11.6'
JULIA_CUDA_USE_BINARYBUILDER: 'true'
if: build.message !~ /\[skip tests\]/ && !build.pull_request.draft
timeout_in_minutes: 120

- label: "CUTENSORNET"
plugins:
- JuliaCI/julia#v1:
version: 1.6
- JuliaCI/julia-test#v1: ~
- JuliaCI/julia-coverage#v1:
codecov: true
dirs:
- src
- lib
- examples
agents:
queue: "juliagpu"
cuda: "11.0"
cap: "sm_80"
package: "CUTENSORNET.jl"
env:
JULIA_CUDA_VERSION: '11.6'
JULIA_CUDA_USE_BINARYBUILDER: 'true'
if: build.message !~ /\[skip tests\]/ && !build.pull_request.draft
timeout_in_minutes: 120


# other tasks
Expand Down
30 changes: 29 additions & 1 deletion Artifacts.toml
Expand Up @@ -1366,7 +1366,6 @@ os = "linux"
sha256 = "19a7aaa8eeaddfb0b31d0f60bcb72ee5cc15056f7ce54ee9d843ae6fe3c66157"
url = "https://github.com/JuliaBinaryWrappers/CUTENSOR_jll.jl/releases/download/CUTENSOR-v1.4.0+0/CUTENSOR.v1.4.0.aarch64-linux-gnu-cuda+11.6.tar.gz"


# NCCL

[[NCCL]]
Expand Down Expand Up @@ -1457,3 +1456,32 @@ os = "linux"
[[NCCL.download]]
sha256 = "98195c8f287476c254310e38ba4fe117ab85ba03b470c8d2370be19d9cf6544c"
url = "https://github.com/JuliaBinaryWrappers/NCCL_jll.jl/releases/download/NCCL-v2.12.7+0/NCCL.v2.12.7.aarch64-linux-gnu-cuda+11.6.tar.gz"

# cuQuantum
[[cuQuantum]]
arch = "aarch64"
git-tree-sha1 = "336529964c830b84d5b77e75e0e364476fb8fbde"
libc = "glibc"
os = "linux"

[[cuQuantum.download]]
sha256 = "d6ffdaa9f5d1eaaa01e26bcde23d730c9f0219f8f296ae73f8817f8ef30f764b"
url = "https://github.com/JuliaBinaryWrappers/cuQuantum_jll.jl/releases/download/cuQuantum-v0.1.30+0/cuQuantum.v0.1.30.aarch64-linux-gnu.tar.gz"
[[cuQuantum]]
arch = "powerpc64le"
git-tree-sha1 = "230108fb2804397bf411cc625de0217a1fc81851"
libc = "glibc"
os = "linux"

[[cuQuantum.download]]
sha256 = "4ee24c91aeeafcd4244c4c792227aade1c5aab06b455012789663e29990e942d"
url = "https://github.com/JuliaBinaryWrappers/cuQuantum_jll.jl/releases/download/cuQuantum-v0.1.30+0/cuQuantum.v0.1.30.powerpc64le-linux-gnu.tar.gz"
[[cuQuantum]]
arch = "x86_64"
git-tree-sha1 = "a15ee0481a41eb937f5deb01829a1a9b78010949"
libc = "glibc"
os = "linux"

[[cuQuantum.download]]
sha256 = "ba2d35f70dbc7efc660fec57dbc61bfb33354d71d6b9b74876341ecba618df8c"
url = "https://github.com/JuliaBinaryWrappers/cuQuantum_jll.jl/releases/download/cuQuantum-v0.1.30+0/cuQuantum.v0.1.30.x86_64-linux-gnu.tar.gz"
51 changes: 49 additions & 2 deletions deps/bindeps.jl
Expand Up @@ -689,7 +689,7 @@ function libcutensornet(; throw_error::Bool=true)
# CUTENSORNET depends on CUTENSOR
libcutensor()

find_library("cutensornet", locations=[joinpath(ENV["HOME"],"cuquantum")])
find_cutensornet(toolkit(), "cutensornet", v"1")
end
if path === nothing && throw_error
error("This functionality is unavailabe as CUTENSORNET is missing.")
Expand All @@ -701,11 +701,58 @@ has_cutensornet() = libcutensornet(throw_error=false) !== nothing
const __libcustatevec = Ref{Union{String,Nothing}}()
function libcustatevec(; throw_error::Bool=true)
path = @initialize_ref __libcustatevec begin
find_library("custatevec", locations=[joinpath(ENV["HOME"],"cuquantum")])
find_custatevec(toolkit(), "custatevec", v"1")
end
if path === nothing && throw_error
error("This functionality is unavailabe as CUSTATEVEC is missing.")
end
return path
end
has_custatevec() = libcustatevec(throw_error=false) !== nothing

function find_cutensornet(cuda::ArtifactToolkit, name, version)
artifact_dir = cuda_artifact("CUQUANTUM", cuda.release)
if artifact_dir === nothing
return nothing
end
path = artifact_library(artifact_dir, name, [version])

@debug "Using CUTENSORNET library $name from an artifact at $(artifact_dir)"
Libdl.dlopen(path)
return path
end

function find_cutensornet(cuda::LocalToolkit, name, version)
path = find_library(name, [version]; locations=cuda.dirs)
if path === nothing
return nothing
end

@debug "Using local CUTENSORNET library $name at $(path)"
Libdl.dlopen(path)
return path
end

function find_custatevec(cuda::ArtifactToolkit, name, version)
artifact_dir = cuda_artifact("CUQUANTUM", cuda.release)
if artifact_dir === nothing
return nothing
end
path = artifact_library(artifact_dir, name, [version])

@debug "Using CUSTATEVEC library $name from an artifact at $(artifact_dir)"
Libdl.dlopen(path)
return path
end

function find_custatevec(cuda::LocalToolkit, name, version)
path = find_library(name, [version]; locations=cuda.dirs)
if path === nothing
return nothing
end

@debug "Using local CUSTATEVEC library $name at $(path)"
Libdl.dlopen(path)
return path
end

2 changes: 1 addition & 1 deletion res/wrap/wrap.jl
Expand Up @@ -423,7 +423,7 @@ function main()
cupti = joinpath(CUDA_full_jll.artifact_dir, "cuda", "extras", "CUPTI", "include")
cudnn = joinpath(CUDNN_jll.artifact_dir, "include")
cutensor = joinpath(CUTENSOR_jll.artifact_dir, "include")
cuquantum = joinpath(ENV["HOME"], "cuquantum", "include")
cuquantum = joinpath(CUQUANTUM_jll.artifact_dir, "include")

process("cudadrv", "$cuda/cuda.h","$cuda/cudaGL.h", "$cuda/cudaProfiler.h";
include_dirs=[cuda], libname="cuda")
Expand Down

0 comments on commit 1e37f18

Please sign in to comment.