P4 to Git Change 1567428 by gandryey@gera-w8 on 2018/06/12 18:39:23
SWDEV-79445 - OCL generic changes and code clean-up
- Optimize setup of kernel arguments. Stage 2.
- Add HW ABI support in the abstraction layer
- Remove arguments parsing loop from the kernel launch. Memory processing will be responsible for dependency tracking and patching of arguments.
http://ocltc.amd.com/reviews/r/15122/
Affected files ...
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#221 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#307 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpukernel.cpp#325 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palblit.cpp#24 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.cpp#53 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palkernel.hpp#17 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palmemory.hpp#9 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#107 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.hpp#53 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rockernel.cpp#36 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/kernel.cpp#30 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/kernel.hpp#23 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#95 edit
[ROCm/clr commit: 1be400ff01]
This commit is contained in:
@@ -36,18 +36,30 @@ class Program;
|
||||
class KernelSignature : public HeapObject {
|
||||
private:
|
||||
std::vector<KernelParameterDescriptor> params_;
|
||||
std::vector<KernelParameterDescriptor> hiddenParams_;
|
||||
std::string attributes_; //!< The kernel attributes
|
||||
uint32_t paramsSize_;
|
||||
uint32_t numMemories_;
|
||||
uint32_t numSamplers_;
|
||||
uint32_t numQueues_;
|
||||
uint32_t version_;
|
||||
|
||||
public:
|
||||
enum {
|
||||
ABIVersion_0 = 0, //! ABI constructed based on the OCL semantics
|
||||
ABIVersion_1 = 1 //! ABI constructed based on the HW ABI returned from the compiler
|
||||
};
|
||||
|
||||
//! Default constructor
|
||||
KernelSignature() : paramsSize_(0), numMemories_(0), numSamplers_(0), numQueues_(0) {}
|
||||
KernelSignature():
|
||||
paramsSize_(0), numMemories_(0), numSamplers_(0),
|
||||
numQueues_(0), version_(ABIVersion_0) {}
|
||||
|
||||
//! Construct a new signature.
|
||||
KernelSignature(const std::vector<KernelParameterDescriptor>& params, const std::string& attrib);
|
||||
KernelSignature(const std::vector<KernelParameterDescriptor>& params,
|
||||
const std::string& attrib,
|
||||
const std::vector<KernelParameterDescriptor>& hiddenParams,
|
||||
uint32_t version);
|
||||
|
||||
//! Return the number of parameters
|
||||
size_t numParameters() const { return params_.size(); }
|
||||
@@ -72,8 +84,17 @@ class KernelSignature : public HeapObject {
|
||||
//! Returns the number of queue objects.
|
||||
uint32_t numQueues() const { return numQueues_; }
|
||||
|
||||
//! Returns the signature version
|
||||
uint32_t version() const { return version_; }
|
||||
|
||||
//! Return the kernel attributes
|
||||
const std::string& attributes() const { return attributes_; }
|
||||
|
||||
const std::vector<KernelParameterDescriptor>& hiddenParameters() const
|
||||
{ return hiddenParams_; }
|
||||
|
||||
const std::vector<KernelParameterDescriptor>& parameters() const
|
||||
{ return params_; }
|
||||
};
|
||||
|
||||
// @todo: look into a copy-on-write model instead of copy-on-read.
|
||||
|
||||
Reference in New Issue
Block a user