P4 to Git Change 1987582 by cpaquot@cpaquot-ocl-lc-lnx on 2019/08/22 13:20:28

SWDEV-185742 - [HIP] Add a svm path to avoid analyzing the mem objs
	and just memcpy the kernel args

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_module.cpp#36 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#82 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.hpp#25 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#96 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.hpp#94 edit
This commit is contained in:
foreman
2019-08-22 13:26:57 -04:00
والد d34d591676
کامیت b02f98556a
4فایلهای تغییر یافته به همراه14 افزوده شده و 9 حذف شده
@@ -230,12 +230,13 @@ 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)
uint32_t sharedMemBytes, uint32_t extraParam, bool svm)
: Command(queue, CL_COMMAND_NDRANGE_KERNEL, eventWaitList, AMD_SERIALIZE_KERNEL)
, kernel_(kernel)
, sizes_(sizes)
, sharedMemBytes_(sharedMemBytes)
, extraParam_(extraParam) {
, extraParam_(extraParam)
, svm_(svm) {
auto& device = queue.device();
auto devKernel = const_cast<device::Kernel*>(kernel.getDeviceKernel(device));
profilingInfo_.setCallback(devKernel->getProfilingCallback(
@@ -764,6 +764,7 @@ class NDRangeKernelCommand : public Command {
address parameters_;
uint32_t sharedMemBytes_;
uint32_t extraParam_;
bool svm_;
public:
enum {
@@ -774,7 +775,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);
uint32_t extraParam = 0, bool svm = false);
virtual void submit(device::VirtualDevice& device) { device.submitKernel(*this); }
@@ -805,6 +806,9 @@ 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 {