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

Create Vec based on Managed Memory #50

Merged
merged 2 commits into from
Aug 9, 2018
Merged

Create Vec based on Managed Memory #50

merged 2 commits into from
Aug 9, 2018

Conversation

kpp
Copy link
Contributor

@kpp kpp commented Aug 1, 2018

I named it MVec (M stands for Managed wheres U stands for Uniformed (I guess so))

@termoshtt
Copy link
Owner

Manged memory reserved by cudaMalloc cannot be accessed from host code since it is allocated on the device. I agree to create an interface for managed memory, but we should not implement Derefand Index for it. I think the approach by thrust, i.e. creating host_vector and device_vector will be better. Your MVec seems to corresponds to device_vector. Could you create memcpy wrapper from Vec to MVec?

@kpp
Copy link
Contributor Author

kpp commented Aug 1, 2018

Sure! I am working on it.

@kpp
Copy link
Contributor Author

kpp commented Aug 1, 2018

---- uvec::tests::uvec_new stdout ----
	thread 'uvec::tests::uvec_new' panicked at 'called `Result::unwrap()` on an `Err` value: cudaRuntimeError(InsufficientDriver)', libcore/result.rs:945:5

seems like you did not set up your CI and build env correctly. I can write the code but I can't check it locally.

@termoshtt
Copy link
Owner

seems like you did not set up your CI and build env correctly. I can write the code but I can't check it locally.

CI with GPU is not running currently #9

@kpp
Copy link
Contributor Author

kpp commented Aug 1, 2018

Could you create memcpy wrapper from Vec to MVec?

done

@kpp
Copy link
Contributor Author

kpp commented Aug 9, 2018

@termoshtt would you merge it?

@termoshtt
Copy link
Owner

Sorry for later replay. I will merge it after I confirm it works on my env.

termoshtt added a commit that referenced this pull request Aug 9, 2018
@termoshtt
Copy link
Owner

Fix host vector init, and it works well. Thanks :)

@mergecat mergecat bot merged commit 71f8dd0 into termoshtt:master Aug 9, 2018
@kpp kpp deleted the mvec branch August 9, 2018 19:13
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.

2 participants