diff options
Diffstat (limited to 'parallel-libs/streamexecutor/lib/unittests/KernelTest.cpp')
| -rw-r--r-- | parallel-libs/streamexecutor/lib/unittests/KernelTest.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/parallel-libs/streamexecutor/lib/unittests/KernelTest.cpp b/parallel-libs/streamexecutor/lib/unittests/KernelTest.cpp index b5ee8a0cbfc..a19ebfb96bd 100644 --- a/parallel-libs/streamexecutor/lib/unittests/KernelTest.cpp +++ b/parallel-libs/streamexecutor/lib/unittests/KernelTest.cpp @@ -14,7 +14,7 @@ #include <cassert> -#include "streamexecutor/Executor.h" +#include "streamexecutor/Device.h" #include "streamexecutor/Kernel.h" #include "streamexecutor/KernelSpec.h" #include "streamexecutor/PlatformInterfaces.h" @@ -27,7 +27,7 @@ namespace { namespace se = ::streamexecutor; -// An Executor that returns a dummy KernelInterface. +// A Device that returns a dummy KernelInterface. // // During construction it creates a unique_ptr to a dummy KernelInterface and it // also stores a separate copy of the raw pointer that is stored by that @@ -39,10 +39,10 @@ namespace se = ::streamexecutor; // object. The raw pointer copy can then be used to identify the unique_ptr in // its new location (by comparing the raw pointer with unique_ptr::get), to // verify that the unique_ptr ended up where it was supposed to be. -class MockExecutor : public se::Executor { +class MockDevice : public se::Device { public: - MockExecutor() - : se::Executor(nullptr), Unique(llvm::make_unique<se::KernelInterface>()), + MockDevice() + : se::Device(nullptr), Unique(llvm::make_unique<se::KernelInterface>()), Raw(Unique.get()) {} // Moves the unique pointer into the returned se::Expected instance. @@ -51,7 +51,7 @@ public: // out. se::Expected<std::unique_ptr<se::KernelInterface>> getKernelImplementation(const se::MultiKernelLoaderSpec &) override { - assert(Unique && "MockExecutor getKernelImplementation should not be " + assert(Unique && "MockDevice getKernelImplementation should not be " "called more than once"); return std::move(Unique); } @@ -79,15 +79,15 @@ TYPED_TEST_CASE(GetImplementationTest, GetImplementationTypes); // Tests that the kernel create functions properly fetch the implementation // pointers for the kernel objects they construct from the passed-in -// Executor objects. +// Device objects. TYPED_TEST(GetImplementationTest, SetImplementationDuringCreate) { se::MultiKernelLoaderSpec Spec; - MockExecutor MockExecutor; + MockDevice Dev; - auto MaybeKernel = TypeParam::create(&MockExecutor, Spec); + auto MaybeKernel = TypeParam::create(&Dev, Spec); EXPECT_TRUE(static_cast<bool>(MaybeKernel)); se::KernelInterface *Implementation = MaybeKernel->getImplementation(); - EXPECT_EQ(MockExecutor.getRaw(), Implementation); + EXPECT_EQ(Dev.getRaw(), Implementation); } } // namespace |

