diff --git a/rocclr/runtime/device/rocm/rocvirtual.cpp b/rocclr/runtime/device/rocm/rocvirtual.cpp index 58cb69974e..fcfd34fdd7 100644 --- a/rocclr/runtime/device/rocm/rocvirtual.cpp +++ b/rocclr/runtime/device/rocm/rocvirtual.cpp @@ -575,7 +575,7 @@ VirtualGPU::VirtualGPU(Device& device) kernarg_pool_base_ = nullptr; kernarg_pool_size_ = 0; kernarg_pool_cur_offset_ = 0; - aqlHeader_ = kDispatchPacketHeader; + aqlHeader_ = kDispatchPacketHeaderNoSync; barrier_signal_.handle = 0; // Note: Virtual GPU device creation must be a thread safe operation @@ -1980,13 +1980,13 @@ bool VirtualGPU::createVirtualQueue(uint deviceQueueSize) } bool VirtualGPU::submitKernelInternal(const amd::NDRangeContainer& sizes, const amd::Kernel& kernel, - const_address parameters, void* eventHandle, uint32_t sharedMemBytes, bool cooperativeGroups, bool isSvm) { + const_address parameters, void* eventHandle, uint32_t sharedMemBytes, bool cooperativeGroups) { device::Kernel* devKernel = const_cast(kernel.getDeviceKernel(dev())); Kernel& gpuKernel = static_cast(*devKernel); size_t ldsUsage = gpuKernel.WorkgroupGroupSegmentByteSize(); // Check memory dependency and SVM objects - if (!isSvm && !processMemObjects(kernel, parameters, ldsUsage, cooperativeGroups)) { + if (!processMemObjects(kernel, parameters, ldsUsage, cooperativeGroups)) { LogError("Wrong memory objects!"); return false; } @@ -2112,6 +2112,7 @@ bool VirtualGPU::submitKernelInternal(const amd::NDRangeContainer& sizes, const AmdAqlWrap* wrap = reinterpret_cast(reinterpret_cast(schedulerParam_->getHostMem()) + sizeof(SchedulerParam)); memset(wrap, 0, sizeof(AmdAqlWrap)); wrap->state = AQL_WRAP_DONE; + spVA = reinterpret_cast(schedulerMem->getDeviceMemory()) + sizeof(SchedulerParam); } WriteAqlArgAt(const_cast
(parameters), &spVA, it.size_, it.offset_); @@ -2223,7 +2224,7 @@ void VirtualGPU::submitKernel(amd::NDRangeKernelCommand& vcmd) { // Submit kernel to HW if (!queue->submitKernelInternal(vcmd.sizes(), vcmd.kernel(), vcmd.parameters(), - static_cast(as_cl(&vcmd.event())), vcmd.sharedMemBytes(), vcmd.cooperativeGroups()), vcmd.isSvm()) { + static_cast(as_cl(&vcmd.event())), vcmd.sharedMemBytes(), vcmd.cooperativeGroups())) { LogError("AQL dispatch failed!"); vcmd.setStatus(CL_INVALID_OPERATION); } diff --git a/rocclr/runtime/device/rocm/rocvirtual.hpp b/rocclr/runtime/device/rocm/rocvirtual.hpp index 821ddc3a52..1e4717f9aa 100644 --- a/rocclr/runtime/device/rocm/rocvirtual.hpp +++ b/rocclr/runtime/device/rocm/rocvirtual.hpp @@ -168,8 +168,7 @@ class VirtualGPU : public device::VirtualDevice { const_address parameters, //!< Parameters for the kernel void* event_handle, //!< Handle to OCL event for debugging uint32_t sharedMemBytes = 0, //!< Shared memory size - bool cooperativeGroups = false, //!< TRUE if cooperative groups mode is required - bool isSvm = false //!< TRUE if all params are SVM + bool cooperativeGroups = false //!< TRUE if cooperative groups mode is required ); void submitNativeFn(amd::NativeFnCommand& cmd); void submitMarker(amd::Marker& cmd); diff --git a/rocclr/runtime/platform/command.cpp b/rocclr/runtime/platform/command.cpp index 17520ad683..e67c9067dc 100644 --- a/rocclr/runtime/platform/command.cpp +++ b/rocclr/runtime/platform/command.cpp @@ -232,13 +232,12 @@ const Context& Command::context() const { return queue_->context(); } NDRangeKernelCommand::NDRangeKernelCommand(HostQueue& queue, const EventWaitList& eventWaitList, Kernel& kernel, const NDRangeContainer& sizes, - uint32_t sharedMemBytes, uint32_t extraParam, bool svm) + uint32_t sharedMemBytes, uint32_t extraParam) : Command(queue, CL_COMMAND_NDRANGE_KERNEL, eventWaitList, AMD_SERIALIZE_KERNEL) , kernel_(kernel) , sizes_(sizes) , sharedMemBytes_(sharedMemBytes) - , extraParam_(extraParam) - , svm_(svm) { + , extraParam_(extraParam) { auto& device = queue.device(); auto devKernel = const_cast(kernel.getDeviceKernel(device)); profilingInfo_.setCallback(devKernel->getProfilingCallback( diff --git a/rocclr/runtime/platform/command.hpp b/rocclr/runtime/platform/command.hpp index 42d1f7016c..e55a33fe2b 100644 --- a/rocclr/runtime/platform/command.hpp +++ b/rocclr/runtime/platform/command.hpp @@ -767,7 +767,6 @@ class NDRangeKernelCommand : public Command { address parameters_; uint32_t sharedMemBytes_; uint32_t extraParam_; - bool svm_; public: enum { @@ -778,7 +777,7 @@ class NDRangeKernelCommand : public Command { //! Construct an ExecuteKernel command NDRangeKernelCommand(HostQueue& queue, const EventWaitList& eventWaitList, Kernel& kernel, const NDRangeContainer& sizes, uint32_t sharedMemBytes = 0, - uint32_t extraParam = 0, bool svm = false); + uint32_t extraParam = 0); virtual void submit(device::VirtualDevice& device) { device.submitKernel(*this); } @@ -809,9 +808,6 @@ class NDRangeKernelCommand : public Command { void setLocalWorkSize(const NDRange& local) { sizes_.local() = local; } cl_int captureAndValidate(); - - //! Return if NDRange is svm or not - bool isSvm() const { return svm_; } }; class NativeFnCommand : public Command {