it moves preallocated memory from host to pinned memory.
Please be more specif on "moves". cudaHostRegister?
then from pinned memory to device memory
zero copy, page migration or copied to a device memory segment?

Ye

From: Ecp-aurora-sdk-discuss <ecp-aurora-sdk-discuss-bounces@lists.jlse.anl.gov> on behalf of David Poole via Ecp-aurora-sdk-discuss <ecp-aurora-sdk-discuss@lists.jlse.anl.gov>
Sent: Thursday, October 15, 2020 4:19 PM
To: Harms, Kevin <harms@alcf.anl.gov>
Cc: ecp-aurora-sdk-discuss@lists.jlse.anl.gov <ecp-aurora-sdk-discuss@lists.jlse.anl.gov>
Subject: Re: [Ecp-aurora-sdk-discuss] Translating Streams to Queues
 
Hi all,

I have another question, if that is all right.

One of the big features of the code that I am working on, is that it moves preallocated memory from host to pinned memory, then from pinned memory to device memory. I was wondering if DPC++ currently has support for pinned memory access/allocations.

Thanks again!

Sincerely,
-David Poole

-----------------------------------------------
"It is the mark of an educated mind to
be able to entertain a thought without
accepting it." - Aristotle


David Poole
Iowa State University
201 Spedding Hall
davpoole@iastate.edu

"I would rather have questions that can't
be answered than answers that can't be
questioned." - Richard Feynman

"For me, I am driven by two main 
philosophies: know more today about
the world than I knew yesterday and
lessen the suffering of others. You'd
be surprised how far that gets 
you. " - Neil deGrasse Tyson
-----------------------------------------------



On Thu, Oct 15, 2020 at 11:23 AM David Poole <davpoole@iastate.edu> wrote:
Hi Kevin,

Ah, that's all good to know! Thank you very much! I will try it out and see what happens.

Best,
-David Poole

-----------------------------------------------
"It is the mark of an educated mind to
be able to entertain a thought without
accepting it." - Aristotle


David Poole
Iowa State University
201 Spedding Hall
davpoole@iastate.edu

"I would rather have questions that can't
be answered than answers that can't be
questioned." - Richard Feynman

"For me, I am driven by two main 
philosophies: know more today about
the world than I knew yesterday and
lessen the suffering of others. You'd
be surprised how far that gets 
you. " - Neil deGrasse Tyson
-----------------------------------------------



On Tue, Oct 13, 2020 at 11:16 AM Harms, Kevin <harms@alcf.anl.gov> wrote:
David,

  cudaStreamSynchronize blocks until all stream operations are completed. A queue wait() function should be equivalent. The one caveat is queue.wait() does not wait for all data transfers to be complete. It is not clear from the documentation on cudaStreamSynchronize if it does or doesn't wait for memory transfer completion.

  As for cudaStreamCreateWithFlags, if you're using cudaStreamNonBlocking, i think the default behavior of SYCL will be the same as operations in different queues may run concurrently, however, if you introduce some dependency between kernels in different queues, then execution will no longer allow concurrency.

kevin

________________________________________
From: Ecp-aurora-sdk-discuss <ecp-aurora-sdk-discuss-bounces@lists.jlse.anl.gov> on behalf of David Poole via Ecp-aurora-sdk-discuss <ecp-aurora-sdk-discuss@lists.jlse.anl.gov>
Sent: Monday, October 12, 2020 5:44 PM
To: ecp-aurora-sdk-discuss@lists.jlse.anl.gov
Subject: [Ecp-aurora-sdk-discuss] Translating Streams to Queues

Hi all,

I wanted to ask about translating CUDA streams to DPC++ queues in the porting of CUDA to DPC++ code.

I am currently working on porting a couple of files which are heavy in stream manipulation, using functions such as cudaStreamSynchronize, cudaStreamCreateWithFlags, and cudaStreamDestroy. In trying the DPC++ translator on the code I am working on, these functions did not translate over. If I recall, CUDA streams (kind of) map to DPC++ queues, and I'm guessing cudaStreamDestroy could be handled by object lifetime rules/RAII; but I'm not quite sure about the other two functions could be mapped to DPC++ queues. How would one go about that, then?

Thank you very much in advance!

Sincerely,
-David Poole

-----------------------------------------------
"It is the mark of an educated mind to
be able to entertain a thought without
accepting it." - Aristotle

David Poole
Iowa State University
201 Spedding Hall
davpoole@iastate.edu<mailto:davpoole@iastate.edu>

"I would rather have questions that can't
be answered than answers that can't be
questioned." - Richard Feynman

"For me, I am driven by two main
philosophies: know more today about
the world than I knew yesterday and
lessen the suffering of others. You'd
be surprised how far that gets
you. " - Neil deGrasse Tyson
-----------------------------------------------