diff options
Diffstat (limited to 'parallel-libs/streamexecutor/examples/Example.cpp')
-rw-r--r-- | parallel-libs/streamexecutor/examples/Example.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/parallel-libs/streamexecutor/examples/Example.cpp b/parallel-libs/streamexecutor/examples/Example.cpp index 8f42ffa0a3b..76027a860f6 100644 --- a/parallel-libs/streamexecutor/examples/Example.cpp +++ b/parallel-libs/streamexecutor/examples/Example.cpp @@ -18,7 +18,6 @@ #include <cassert> #include <cstdio> #include <cstdlib> -#include <memory> #include <vector> #include "streamexecutor/StreamExecutor.h" @@ -111,7 +110,7 @@ int main() { se::Device *Device = getOrDie(Platform->getDevice(0)); // Load the kernel onto the device. - std::unique_ptr<cg::SaxpyKernel> Kernel = + cg::SaxpyKernel Kernel = getOrDie(Device->createKernel<cg::SaxpyKernel>(cg::SaxpyLoaderSpec)); // Allocate memory on the device. @@ -124,7 +123,7 @@ int main() { se::Stream Stream = getOrDie(Device->createStream()); Stream.thenCopyH2D<float>(HostX, X) .thenCopyH2D<float>(HostY, Y) - .thenLaunch(ArraySize, 1, *Kernel, A, X, Y) + .thenLaunch(ArraySize, 1, Kernel, A, X, Y) .thenCopyD2H<float>(X, HostX); // Wait for the stream to complete. se::dieIfError(Stream.blockHostUntilDone()); |