-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #62 from QuantumBFS/compat-CUDA
compatibility upgrade - CUDA
- Loading branch information
Showing
14 changed files
with
50 additions
and
50 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,4 +1,4 @@ | ||
using CuArrays, CUDAnative | ||
using CUDA | ||
using LinearAlgebra | ||
using BenchmarkTools | ||
|
||
|
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,18 +1,18 @@ | ||
using Yao, CuYao, CuArrays | ||
using Yao, CuYao, CUDA | ||
using BenchmarkTools | ||
|
||
reg = rand_state(12; nbatch=1000) | ||
creg = reg |> cu | ||
@benchmark CuArrays.@sync creg |> put(12, 3=>Z) | ||
@benchmark CuArrays.@sync creg |> put(12, 3=>X) | ||
@benchmark CUDA.@sync creg |> put(12, 3=>Z) | ||
@benchmark CUDA.@sync creg |> put(12, 3=>X) | ||
@benchmark reg |> put(12, 3=>Z) | ||
@benchmark CuArrays.@sync creg |> control(12, 6, 3=>X) | ||
@benchmark CUDA.@sync creg |> control(12, 6, 3=>X) | ||
@benchmark reg |> control(12, 6, 3=>X) | ||
@benchmark CuArrays.@sync creg |> put(12, 3=>rot(X, 0.3)) | ||
@benchmark CUDA.@sync creg |> put(12, 3=>rot(X, 0.3)) | ||
@benchmark reg |> put(12, 3=>rot(X, 0.3)) | ||
|
||
reg = rand_state(20) | ||
creg = reg |> cu | ||
g = swap(12, 7, 2) | ||
@benchmark reg |> g | ||
@benchmark CuArrays.@sync creg |> g | ||
@benchmark CUDA.@sync creg |> g |
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
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
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