P4 to Git Change 1551928 by gandryey@gera-w8 on 2018/05/08 12:42:43
SWDEV-151981 - Removal of CPU support on Windows
- Part 3. Remove device fission extension
Affected files ...
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_common.hpp#20 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_context.cpp#59 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_device.cpp#71 edit
... //depot/stg/opencl/drivers/opencl/api/opencl/amdocl/cl_icd.cpp#32 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.cpp#218 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/device.hpp#299 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/gpu/gpudevice.hpp#165 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/pal/paldevice.hpp#28 edit
... //depot/stg/opencl/drivers/opencl/runtime/device/rocm/rocdevice.hpp#26 edit
[ROCm/clr commit: ac50335c91]
This commit is contained in:
@@ -230,11 +230,6 @@ Device::~Device() {
|
||||
delete[] info_.extensions_;
|
||||
}
|
||||
}
|
||||
|
||||
if (info_.partitionCreateInfo_.type_.byCounts_ &&
|
||||
info_.partitionCreateInfo_.byCounts_.countsList_ != NULL) {
|
||||
delete[] info_.partitionCreateInfo_.byCounts_.countsList_;
|
||||
}
|
||||
}
|
||||
|
||||
bool Device::create() {
|
||||
@@ -1635,83 +1630,4 @@ bool ClBinary::isSPIRV() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
cl_device_partition_property PartitionType::toCL() const {
|
||||
static cl_device_partition_property conv[] = {CL_DEVICE_PARTITION_EQUALLY,
|
||||
CL_DEVICE_PARTITION_BY_COUNTS,
|
||||
CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN};
|
||||
return conv[amd::leastBitSet(value_)];
|
||||
}
|
||||
|
||||
size_t PartitionType::toCL(cl_device_partition_property* types) const {
|
||||
size_t i = 0;
|
||||
if (equally_) {
|
||||
types[i++] = CL_DEVICE_PARTITION_EQUALLY;
|
||||
}
|
||||
if (byCounts_) {
|
||||
types[i++] = CL_DEVICE_PARTITION_BY_COUNTS;
|
||||
}
|
||||
if (byAffinityDomain_) {
|
||||
types[i++] = CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
cl_device_affinity_domain AffinityDomain::toCL() const { return (cl_device_affinity_domain)value_; }
|
||||
|
||||
#ifdef cl_ext_device_fission
|
||||
|
||||
cl_device_partition_property_ext PartitionType::toCLExt() const {
|
||||
static cl_device_partition_property_ext conv[] = {CL_DEVICE_PARTITION_EQUALLY_EXT,
|
||||
CL_DEVICE_PARTITION_BY_COUNTS_EXT,
|
||||
CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT};
|
||||
return conv[amd::leastBitSet(value_)];
|
||||
}
|
||||
|
||||
size_t PartitionType::toCLExt(cl_device_partition_property_ext* types) const {
|
||||
size_t i = 0;
|
||||
if (equally_) {
|
||||
types[i++] = CL_DEVICE_PARTITION_EQUALLY_EXT;
|
||||
}
|
||||
if (byCounts_) {
|
||||
types[i++] = CL_DEVICE_PARTITION_BY_COUNTS_EXT;
|
||||
}
|
||||
if (byAffinityDomain_) {
|
||||
types[i++] = CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
cl_device_partition_property_ext AffinityDomain::toCLExt() const {
|
||||
static cl_device_partition_property_ext conv[] = {
|
||||
CL_AFFINITY_DOMAIN_NUMA_EXT, CL_AFFINITY_DOMAIN_L4_CACHE_EXT,
|
||||
CL_AFFINITY_DOMAIN_L3_CACHE_EXT, CL_AFFINITY_DOMAIN_L2_CACHE_EXT,
|
||||
CL_AFFINITY_DOMAIN_L1_CACHE_EXT, CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT};
|
||||
return conv[amd::leastBitSet(value_)];
|
||||
}
|
||||
|
||||
size_t AffinityDomain::toCLExt(cl_device_partition_property_ext* affinities) const {
|
||||
size_t i = 0;
|
||||
if (numa_) {
|
||||
affinities[i++] = CL_AFFINITY_DOMAIN_NUMA_EXT;
|
||||
}
|
||||
if (cacheL4_) {
|
||||
affinities[i++] = CL_AFFINITY_DOMAIN_L4_CACHE_EXT;
|
||||
}
|
||||
if (cacheL3_) {
|
||||
affinities[i++] = CL_AFFINITY_DOMAIN_L3_CACHE_EXT;
|
||||
}
|
||||
if (cacheL2_) {
|
||||
affinities[i++] = CL_AFFINITY_DOMAIN_L2_CACHE_EXT;
|
||||
}
|
||||
if (cacheL1_) {
|
||||
affinities[i++] = CL_AFFINITY_DOMAIN_L1_CACHE_EXT;
|
||||
}
|
||||
if (next_) {
|
||||
affinities[i++] = CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
#endif // cl_ext_device_fission
|
||||
|
||||
} // namespace device
|
||||
|
||||
@@ -171,97 +171,6 @@ namespace device {
|
||||
class ClBinary;
|
||||
class BlitManager;
|
||||
|
||||
struct PartitionType : public amd::EmbeddedObject {
|
||||
enum { EQUALLY = (1 << 0), BY_COUNTS = (1 << 1), BY_AFFINITY_DOMAIN = (1 << 2) };
|
||||
|
||||
union {
|
||||
struct {
|
||||
uint equally_ : 1;
|
||||
uint byCounts_ : 1;
|
||||
uint byAffinityDomain_ : 1;
|
||||
};
|
||||
uint value_;
|
||||
};
|
||||
|
||||
size_t getNumSet() const { return (size_t)amd::countBitsSet(value_); }
|
||||
|
||||
cl_device_partition_property toCL() const;
|
||||
size_t toCL(cl_device_partition_property* types) const;
|
||||
#ifdef cl_ext_device_fission
|
||||
cl_device_partition_property_ext toCLExt() const;
|
||||
size_t toCLExt(cl_device_partition_property_ext* types) const;
|
||||
#endif
|
||||
};
|
||||
|
||||
struct AffinityDomain : public amd::EmbeddedObject {
|
||||
enum {
|
||||
AFFINITY_DOMAIN_NUMA = (1 << 0),
|
||||
AFFINITY_DOMAIN_L4_CACHE = (1 << 1),
|
||||
AFFINITY_DOMAIN_L3_CACHE = (1 << 2),
|
||||
AFFINITY_DOMAIN_L2_CACHE = (1 << 3),
|
||||
AFFINITY_DOMAIN_L1_CACHE = (1 << 4),
|
||||
AFFINITY_DOMAIN_NEXT_PARTITIONABLE = (1 << 5)
|
||||
};
|
||||
|
||||
union {
|
||||
struct {
|
||||
uint numa_ : 1;
|
||||
uint cacheL4_ : 1;
|
||||
uint cacheL3_ : 1;
|
||||
uint cacheL2_ : 1;
|
||||
uint cacheL1_ : 1;
|
||||
uint next_ : 1;
|
||||
};
|
||||
uint value_;
|
||||
};
|
||||
|
||||
size_t getNumSet() const { return (size_t)amd::countBitsSet(value_); }
|
||||
|
||||
cl_device_affinity_domain toCL() const;
|
||||
#ifdef cl_ext_device_fission
|
||||
cl_device_partition_property_ext toCLExt() const;
|
||||
size_t toCLExt(cl_device_partition_property_ext* affinities) const;
|
||||
#endif
|
||||
};
|
||||
|
||||
//! Device partition properties.
|
||||
struct PartitionInfo : public amd::EmbeddedObject {
|
||||
PartitionType type_;
|
||||
union {
|
||||
struct {
|
||||
size_t numComputeUnits_;
|
||||
} equally_;
|
||||
|
||||
AffinityDomain byAffinityDomain_;
|
||||
|
||||
struct {
|
||||
const cl_uint* countsList_;
|
||||
size_t listSize_;
|
||||
} byCounts_;
|
||||
};
|
||||
};
|
||||
|
||||
//! Create Sub-Devices request properties.
|
||||
struct CreateSubDevicesInfo : public amd::HeapObject {
|
||||
PartitionInfo p_;
|
||||
virtual cl_uint countsListAt(size_t i) const = 0;
|
||||
virtual ~CreateSubDevicesInfo() {}
|
||||
};
|
||||
|
||||
template <typename PROP_T> struct CreateSubDevicesInfoT : public CreateSubDevicesInfo {
|
||||
virtual cl_uint countsListAt(size_t i) const {
|
||||
return (cl_uint) reinterpret_cast<const PROP_T*>(p_.byCounts_.countsList_)[i];
|
||||
}
|
||||
|
||||
void initCountsList(const PROP_T* props) {
|
||||
p_.byCounts_.countsList_ = reinterpret_cast<const cl_uint*>(props);
|
||||
p_.byCounts_.listSize_ = 0;
|
||||
for (; *props != ((PROP_T)0); ++props) {
|
||||
++p_.byCounts_.listSize_;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
//! Physical device properties.
|
||||
struct Info : public amd::EmbeddedObject {
|
||||
//! The OpenCL device type.
|
||||
@@ -487,17 +396,6 @@ struct Info : public amd::EmbeddedObject {
|
||||
//! Returns max number of images in a 1D or 2D image array
|
||||
size_t imageMaxArraySize_;
|
||||
|
||||
//! Returns the list of partition types supported by device
|
||||
PartitionType partitionProperties_;
|
||||
|
||||
//! Returns the list of supported affinity domains for
|
||||
//! partitioning the device using CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN
|
||||
AffinityDomain affinityDomain_;
|
||||
|
||||
//! Returns the properties argument specified in clCreateSubDevices
|
||||
//! if device is a subdevice.
|
||||
PartitionInfo partitionCreateInfo_;
|
||||
|
||||
//! Returns CL_TRUE if the devices preference is for the user to be
|
||||
//! responsible for synchronization
|
||||
cl_bool preferredInteropUserSync_;
|
||||
@@ -1574,10 +1472,6 @@ class Device : public RuntimeObject {
|
||||
//! Return this device's type.
|
||||
cl_device_type type() const { return info().type_ & ~(CL_DEVICE_TYPE_DEFAULT); }
|
||||
|
||||
//! Create sub-devices according to the given partition scheme.
|
||||
virtual cl_int createSubDevices(device::CreateSubDevicesInfo& create_info, cl_uint num_entries,
|
||||
cl_device_id* devices, cl_uint* num_devices) = 0;
|
||||
|
||||
//! Create a new virtual device environment.
|
||||
virtual device::VirtualDevice* createVirtualDevice(CommandQueue* queue = NULL) = 0;
|
||||
|
||||
|
||||
@@ -52,11 +52,6 @@ class NullDevice : public amd::Device {
|
||||
bool create(CALtarget target //!< GPU device identifier
|
||||
);
|
||||
|
||||
virtual cl_int createSubDevices(device::CreateSubDevicesInfo& create_info, cl_uint num_entries,
|
||||
cl_device_id* devices, cl_uint* num_devices) {
|
||||
return CL_INVALID_VALUE;
|
||||
}
|
||||
|
||||
//! Instantiate a new virtual device
|
||||
virtual device::VirtualDevice* createVirtualDevice(amd::CommandQueue* queue = NULL) {
|
||||
return NULL;
|
||||
|
||||
@@ -51,11 +51,6 @@ class NullDevice : public amd::Device {
|
||||
uint xNACKSupported = 0 //!< GPU xNACKSupported
|
||||
);
|
||||
|
||||
virtual cl_int createSubDevices(device::CreateSubDevicesInfo& create_info, cl_uint num_entries,
|
||||
cl_device_id* devices, cl_uint* num_devices) {
|
||||
return CL_INVALID_VALUE;
|
||||
}
|
||||
|
||||
//! Instantiate a new virtual device
|
||||
virtual device::VirtualDevice* createVirtualDevice(amd::CommandQueue* queue = NULL) {
|
||||
return NULL;
|
||||
|
||||
@@ -285,16 +285,6 @@ class Device : public NullDevice {
|
||||
// need real implementation.
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// #ifdef cl_ext_device_fission
|
||||
//! Create sub-devices according to the given partition scheme.
|
||||
virtual cl_int createSubDevices(device::CreateSubDevicesInfo& create_inf, cl_uint num_entries,
|
||||
cl_device_id* devices, cl_uint* num_devices) {
|
||||
return CL_INVALID_VALUE;
|
||||
}
|
||||
// #endif // cl_ext_device_fission
|
||||
|
||||
// bool Device::create(CALuint ordinal);
|
||||
|
||||
//! Instantiate a new virtual device
|
||||
virtual device::VirtualDevice* createVirtualDevice(amd::CommandQueue* queue = nullptr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user