From d1584c846cefbadd58a93573248098cf4efa5712 Mon Sep 17 00:00:00 2001
From: foreman
Date: Wed, 1 Nov 2017 16:53:27 -0400
Subject: [PATCH] P4 to Git Change 1477581 by wchau@wchau_WIN_OCL_HSA on
2017/11/01 16:33:34
SWDEV-136305 - [OCL 2.1 Plat] API calls for all drivers
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_command.cpp#15 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_svm.cpp#22 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.hpp#87 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/context.hpp#27 edit
[ROCm/clr commit: bafc102e179eff8746f8476fe5439fb55d992a3a]
---
.../clr/rocclr/runtime/platform/command.hpp | 44 -------------------
.../clr/rocclr/runtime/platform/context.hpp | 4 ++
2 files changed, 4 insertions(+), 44 deletions(-)
diff --git a/projects/clr/rocclr/runtime/platform/command.hpp b/projects/clr/rocclr/runtime/platform/command.hpp
index 2e6a0e075a..91d4f18f82 100644
--- a/projects/clr/rocclr/runtime/platform/command.hpp
+++ b/projects/clr/rocclr/runtime/platform/command.hpp
@@ -1232,50 +1232,6 @@ class SvmUnmapMemoryCommand : public Command {
void* svmPtr() const { return svmPtr_; }
};
-/*! \brief Enqueues a command to indicate which device a set of ranges of SVM allocations
- * should be associated with.
- */
-class SvmMigrateMemCommand: public Command {
- private:
- cl_mem_migration_flags migrationFlags_; //!< Migration flags
- std::vector svmPointers_; //!< The list of SVM pointers
- std::vector svmSizes_; //!< Number of bytes to be migrated for svm_pointers[i]
-
- public:
- SvmMigrateMemCommand(HostQueue& queue, const EventWaitList& eventWaitList,
- cl_uint numSvmPointers, const void** svmPointers,
- const size_t *size, cl_mem_migration_flags flags)
- : Command(queue, CL_COMMAND_SVM_MIGRATE_MEM, eventWaitList), migrationFlags_(flags) {
- for (cl_uint i=0; i < numSvmPointers; i++) {
- svmPointers_.push_back(svmPointers[i]);
- if (size == NULL) {
- svmSizes_.push_back(0);
- }
- else {
- svmSizes_.push_back(size[i]);
- }
- }
- }
-
- virtual void submit(device::VirtualDevice& device) {
- //TODO: implement the submit function to the support device
- // i.e. device.submitSvmMigrateMem(*this);
- return;
- }
-
- //! Returns the migration flags
- cl_mem_migration_flags migrationFlags() const { return migrationFlags_; }
-
- //! Returns the number of svm pointers in the command
- cl_uint numSvmPointers() const { return (cl_uint)svmPointers_.size(); }
-
- //! Returns a pointer to the svm pointers
- const void* svmPointer(uint i) const { return svmPointers_[i]; }
-
- //! Returns a pointer to the size of svm range
- const size_t svmSize(uint i) const { return svmSizes_[i]; }
-};
-
/*! \brief A generic transfer memory from/to file command.
*
* \details Currently supports buffers only. Buffers
diff --git a/projects/clr/rocclr/runtime/platform/context.hpp b/projects/clr/rocclr/runtime/platform/context.hpp
index 7721156881..f3ae1306c6 100644
--- a/projects/clr/rocclr/runtime/platform/context.hpp
+++ b/projects/clr/rocclr/runtime/platform/context.hpp
@@ -187,6 +187,10 @@ class Context : public RuntimeObject {
DeviceQueue* queue //!< Device queue
);
+ //! Set the default device queue
+ void setDefDeviceQueue(const Device& dev, DeviceQueue* queue)
+ { deviceQueues_[&dev].defDeviceQueue_ = queue; };
+
private:
const Info info_; //!< Context info structure
cl_context_properties* properties_; //!< Original properties