P4 to Git Change 1559096 by gandryey@gera-w8 on 2018/05/24 10:34:47
SWDEV-79445 - OCL generic changes and code clean-up - Remove obsolete logic for aliased kernels, since it was a pre-SI optimization Affected files ... ... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpuvirtual.cpp#418 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/pal/palvirtual.cpp#98 edit ... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocvirtual.cpp#52 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/kernel.cpp#27 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/kernel.hpp#21 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/program.cpp#93 edit ... //depot/stg/opencl/drivers/opencl/runtime/platform/program.hpp#44 edit
This commit is contained in:
@@ -29,8 +29,8 @@ Kernel::~Kernel() {
|
||||
delete parameters_;
|
||||
}
|
||||
|
||||
const device::Kernel* Kernel::getDeviceKernel(const Device& device, bool noAlias) const {
|
||||
return symbol_.getDeviceKernel(device, noAlias);
|
||||
const device::Kernel* Kernel::getDeviceKernel(const Device& device) const {
|
||||
return symbol_.getDeviceKernel(device);
|
||||
}
|
||||
|
||||
const KernelSignature& Kernel::signature() const { return symbol_.signature(); }
|
||||
|
||||
@@ -273,8 +273,7 @@ class Kernel : public RuntimeObject {
|
||||
const KernelSignature& signature() const;
|
||||
|
||||
//! Return the kernel entry point for the given device.
|
||||
const device::Kernel* getDeviceKernel(const Device& device, //!< Device object
|
||||
bool noAlias = true //!< Controls alias optimization
|
||||
const device::Kernel* getDeviceKernel(const Device& device //!< Device object
|
||||
) const;
|
||||
|
||||
//! Return the parameters.
|
||||
|
||||
@@ -603,22 +603,17 @@ bool Program::ParseAllOptions(const std::string& options, option::Options& parse
|
||||
return amd::option::parseAllOptions(allOpts, parsedOptions, linkOptsOnly);
|
||||
}
|
||||
|
||||
bool Symbol::setDeviceKernel(const Device& device, const device::Kernel* func, bool noAlias) {
|
||||
bool Symbol::setDeviceKernel(const Device& device, const device::Kernel* func) {
|
||||
// FIXME_lmoriche: check that the signatures are compatible
|
||||
if (deviceKernels_.size() == 0) {
|
||||
signature_ = func->signature();
|
||||
}
|
||||
|
||||
if (noAlias) {
|
||||
deviceKernels_[&device] = func;
|
||||
} else {
|
||||
devKernelsNoOpt_[&device] = func;
|
||||
}
|
||||
deviceKernels_[&device] = func;
|
||||
return true;
|
||||
}
|
||||
|
||||
const device::Kernel* Symbol::getDeviceKernel(const Device& device, bool noAlias) const {
|
||||
const devicekernels_t* devKernels = (noAlias) ? &deviceKernels_ : &devKernelsNoOpt_;
|
||||
const device::Kernel* Symbol::getDeviceKernel(const Device& device) const {
|
||||
const devicekernels_t* devKernels = &deviceKernels_;
|
||||
const auto itEnd = devKernels->cend();
|
||||
auto it = devKernels->find(&device);
|
||||
if (it != itEnd) {
|
||||
|
||||
@@ -39,7 +39,6 @@ class Symbol : public HeapObject {
|
||||
|
||||
private:
|
||||
devicekernels_t deviceKernels_; //! All device kernels objects.
|
||||
devicekernels_t devKernelsNoOpt_; //! Kernel objects without optimization
|
||||
KernelSignature signature_; //! Kernel signature.
|
||||
|
||||
public:
|
||||
@@ -48,13 +47,11 @@ class Symbol : public HeapObject {
|
||||
|
||||
//! Set the entry point and check or set the signature.
|
||||
bool setDeviceKernel(const Device& device, //!< Device object.
|
||||
const device::Kernel* func, //!< Device kernel object.
|
||||
bool noAlias = true //!< No-alias optimization
|
||||
const device::Kernel* func //!< Device kernel object.
|
||||
);
|
||||
|
||||
//! Return the device kernel.
|
||||
const device::Kernel* getDeviceKernel(const Device& device, //!< Device object.
|
||||
bool noAlias = true //!< No-alias optimization
|
||||
const device::Kernel* getDeviceKernel(const Device& device //!< Device object.
|
||||
) const;
|
||||
|
||||
//! Return this Symbol's signature.
|
||||
|
||||
Reference in New Issue
Block a user