Skip to content
This repository has been archived by the owner on Mar 12, 2021. It is now read-only.

Use unified memory for array allocations. #336

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

Conversation

maleadt
Copy link
Member

@maleadt maleadt commented May 4, 2019

Massively speeds up host operations, without losing assertscalar-like functionality.

Doesn't properly works right now, due to the coherency requirements of unified memory on pre-sm_60 hardware. Basically, we'd need to synchronize the device before doing any load from unified memory to make sure there's no kernel running (which claims ownership of the unified memory). That would wreck performance again.

I had hoped that JuliaGPU/CUDAdrv.jl#141 would fix this, but that only works around the issue when doing explicit copies (doing a cudaMemcpy instead of just loading from the memory). When indexing, we of course still do a regular memory load, running into the above issue.

If and when we solve this problem, host/unified<->unified transfers should probably do a regular memcpy again (ie. what JuliaGPU/CUDAdrv.jl#141 reverted, but for good reasons).

@maleadt maleadt force-pushed the master branch 2 times, most recently from fc487fd to fced436 Compare January 22, 2020 15:17
@maleadt maleadt marked this pull request as draft May 8, 2020 10:35
@maleadt maleadt changed the title WIP/RFC: Use unified memory for array allocations. Use unified memory for array allocations. May 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant