Skip to content
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

CUDA patch #449

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

CUDA patch #449

wants to merge 6 commits into from

Conversation

Roger-luo
Copy link
Member

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Oct 21, 2022

Codecov Report

Merging #449 (b0741ee) into master (2ce095e) will decrease coverage by 35.69%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master     #449       +/-   ##
===========================================
- Coverage   66.61%   30.91%   -35.70%     
===========================================
  Files          67       31       -36     
  Lines        4211     1695     -2516     
===========================================
- Hits         2805      524     -2281     
+ Misses       1406     1171      -235     
Impacted Files Coverage Δ
lib/BloqadeExpr/src/space.jl
lib/BloqadeSchema/src/types.jl
src/plots/lattices.jl
lib/BloqadeWaveforms/src/smooth.jl
src/plots/bitstring_hist.jl
lib/YaoSubspaceArrayReg/src/type.jl
lib/BloqadeExpr/src/printings.jl
lib/BloqadeExpr/src/mat.jl
src/jlwrap.jl
lib/BloqadeExpr/src/atoms.jl
... and 31 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@weinbe58
Copy link
Member

@Roger-luo What's going on in this PR and can I help out?

@Roger-luo
Copy link
Member Author

I realize I need to write a sampler on CUDA, but haven't had the chance to write it, it should be simple. Otherwise, we can dispatch single measurement to CPU. I can let you work on it if you want to try some CUDA programming in Julia.


end

function CuYao.cu(reg::SubspaceArrayReg{D}) where {D}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think SubspaceArrayReg already overloaded adapt thus adapt(CuArray, reg) should just work?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might have missed that

using BloqadeCUDA


struct Sampler{A,B}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we can start with a simple version without these abstractions

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, I can't seem to figure out how to make the kernel compile without the abstractions.

It is complaining about searchsortedfirst being called inside the map kernel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants