Skip to content

Commit

Permalink
Split cutensornet and custatevec into their own packages
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt committed Mar 28, 2022
1 parent 876173e commit bb4fecf
Show file tree
Hide file tree
Showing 17 changed files with 32 additions and 14 deletions.
8 changes: 8 additions & 0 deletions CUSTATEVEC/Project.toml
@@ -0,0 +1,8 @@
name = "CUSTATEVEC"
uuid = "92f7fd98-d22e-4c0d-85a8-6ade11b672fb"
authors = ["Katharine Hyatt <kslimes@gmail.com>"]
version = "0.1.0"

[deps]
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
6 changes: 3 additions & 3 deletions lib/custatevec/CUSTATEVEC.jl → CUSTATEVEC/src/CUSTATEVEC.jl
@@ -1,8 +1,8 @@
module CUSTATEVEC

using ..CUDA
using ..CUDA: CUstream, cudaDataType, @checked, HandleCache, with_workspace, libraryPropertyType
using ..CUDA: libcustatevec, unsafe_free!, @retry_reclaim, initialize_context
using CUDA
using CUDA: CUstream, cudaDataType, @checked, HandleCache, with_workspace, libraryPropertyType
using CUDA: libcustatevec, unsafe_free!, @retry_reclaim, initialize_context

using CEnum: @cenum

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 4 additions & 3 deletions test/custatevec.jl → CUSTATEVEC/test/runtests.jl
@@ -1,5 +1,6 @@
using CUDA.CUSTATEVEC
import CUDA.CUSTATEVEC: CuStateVec, applyMatrix!, expectation, sample
using Test
using CUSTATEVEC
import CUSTATEVEC: CuStateVec, applyMatrix!, expectation, sample

@testset "CUSTATEVEC" begin
# build a simple state and compute expectations
Expand All @@ -13,7 +14,7 @@ import CUDA.CUSTATEVEC: CuStateVec, applyMatrix!, expectation, sample
exp, res = expectation(sv, Z, Int32[0])
@test exp 0.0 atol=1e-6
exp, res = expectation(sv, X, Int32[0])
@test exp 1.0 atol=1e-6
@test exp 0.0 atol=1e-6
end
# build a simple state with controls and compute expectations
n_q = 2
Expand Down
8 changes: 8 additions & 0 deletions CUTENSORNET/Project.toml
@@ -0,0 +1,8 @@
name = "CUTENSORNET"
uuid = "448d79b3-4b49-4e06-a5ea-00c62c0dc3db"
authors = ["Katharine Hyatt <kshyatt@gmail.com>"]
version = "0.1.0"

[deps]
CEnum = "fa961155-64e5-5f13-b03f-caf6b980ea82"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
@@ -1,8 +1,8 @@
module CUTENSORNET

using ..CUDA
using ..CUDA: CUstream, cudaDataType, @checked, HandleCache, with_workspace
using ..CUDA: libcutensornet, @retry_reclaim, initialize_context
using CUDA
using CUDA: CUstream, cudaDataType, @checked, HandleCache, with_workspace
using CUDA: libcutensornet, @retry_reclaim, initialize_context

using CEnum: @cenum

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 4 additions & 2 deletions test/cutensornet.jl → CUTENSORNET/test/runtests.jl
@@ -1,5 +1,7 @@
using CUDA.CUTENSORNET
import CUDA.CUTENSORNET: CuTensorNetwork, rehearse_contraction, perform_contraction!, AutoTune, NoAutoTune
using Test
using CUDA
using CUTENSORNET
import CUTENSORNET: CuTensorNetwork, rehearse_contraction, perform_contraction!, AutoTune, NoAutoTune

@testset "CUTENSORNET" begin
n = 8
Expand Down
5 changes: 2 additions & 3 deletions src/CUDA.jl
Expand Up @@ -101,9 +101,8 @@ include("../lib/cufft/CUFFT.jl")
include("../lib/curand/CURAND.jl")
include("../lib/cudnn/CUDNN.jl")
include("../lib/cutensor/CUTENSOR.jl")
include("../lib/cutensornet/CUTENSORNET.jl")
include("../lib/custatevec/CUSTATEVEC.jl")
export CUBLAS, CUSPARSE, CUSOLVER, CUFFT, CURAND, CUDNN, CUTENSOR, CUTENSORNET, CUSTATEVEC

export CUBLAS, CUSPARSE, CUSOLVER, CUFFT, CURAND, CUDNN, CUTENSOR

# random depends on CURAND
include("random.jl")
Expand Down

0 comments on commit bb4fecf

Please sign in to comment.