[Parallel_libs-commits] [PATCH] D24528: [SE] Pack global dev handle addresses

Jason Henline via Parallel_libs-commits parallel_libs-commits at lists.llvm.org
Tue Sep 13 16:48:31 PDT 2016


jhen added inline comments.

================
Comment at: streamexecutor/include/streamexecutor/DeviceMemory.h:170
@@ -166,3 +169,3 @@
   Device *TheDevice;  // Pointer to the device on which this memory lives.
   const void *Handle; // Platform-dependent value representing allocated memory.
   size_t ByteCount;   // Size in bytes of this allocation.
----------------
jlebar wrote:
> Same question as last patch: What happens if this guy is moved?
> 
> Specifically, would it be a problem if it were moved after calling thenLaunch but before the driver actually launches the kernel?
Yes, it would be a problem if the argument was moved at the wrong time. This was a choice we made internally to reduce the kernel launch overhead. Apparently it could make up 5% of some applications' run-time.

In response to your question, I added a warning message to the `Stream::thenLaunch` method. This message tells users not to touch kernel launch arguments from other threads.


https://reviews.llvm.org/D24528





More information about the Parallel_libs-commits mailing list