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

Adapt to GPUArrays.jl changes. #487

Merged
merged 1 commit into from
Jan 16, 2025
Merged

Adapt to GPUArrays.jl changes. #487

merged 1 commit into from
Jan 16, 2025

Conversation

maleadt
Copy link
Member

@maleadt maleadt commented Jan 16, 2025

No description provided.

Comment on lines +63 to 70
alignment = Base.datatype_alignment(T)
data = GPUArrays.cached_alloc((oneArray, B, ctx, dev, bufsize, alignment)) do
buf = allocate(B, ctx, dev, bufsize, alignment)
data = DataRef(buf) do buf
release(buf)
end
end
obj = new{T,N,B}(data, maxsize, 0, dims)
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
alignment = Base.datatype_alignment(T)
data = GPUArrays.cached_alloc((oneArray, B, ctx, dev, bufsize, alignment)) do
buf = allocate(B, ctx, dev, bufsize, alignment)
data = DataRef(buf) do buf
release(buf)
end
end
obj = new{T,N,B}(data, maxsize, 0, dims)
alignment = Base.datatype_alignment(T)
data = GPUArrays.cached_alloc((oneArray, B, ctx, dev, bufsize, alignment)) do
buf = allocate(B, ctx, dev, bufsize, alignment)
data = DataRef(buf) do buf
release(buf)
end
return finalizer(unsafe_free!, obj)
return arr

@maleadt maleadt merged commit 517c254 into master Jan 16, 2025
1 of 2 checks passed
@maleadt maleadt deleted the tb/gpuarrays branch January 16, 2025 15:15
Copy link

codecov bot commented Jan 16, 2025

Codecov Report

Attention: Patch coverage is 85.71429% with 1 line in your changes missing coverage. Please review.

Project coverage is 81.93%. Comparing base (497000b) to head (d7c508a).
Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
src/array.jl 85.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #487      +/-   ##
==========================================
+ Coverage   81.91%   81.93%   +0.02%     
==========================================
  Files          45       45              
  Lines        2549     2552       +3     
==========================================
+ Hits         2088     2091       +3     
  Misses        461      461              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant