mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
Remove unused parameter when query extension attribute (#165623)
# Motivation This code is no longer needed since SYCL compiler 2025.0. We are now using compiler 2025.2 (two tool uplifts later), so it can be safely removed. Pull Request resolved: https://github.com/pytorch/pytorch/pull/165623 Approved by: https://github.com/EikanWang ghstack dependencies: #165622
This commit is contained in:
committed by
PyTorch MergeBot
parent
51348c0219
commit
b44fb14906
@ -137,16 +137,6 @@ inline void initGlobalDevicePoolState() {
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(_WIN32) && SYCL_COMPILER_VERSION < 20250000
|
||||
// The default context feature is disabled by default on Windows for SYCL
|
||||
// compiler versions earlier than 2025.0.0.
|
||||
std::vector<sycl::device> deviceList;
|
||||
for (auto it = gDevicePool.devices.begin(); it != gDevicePool.devices.end();
|
||||
++it) {
|
||||
deviceList.push_back(*(*it));
|
||||
}
|
||||
gDevicePool.context = std::make_unique<sycl::context>(deviceList);
|
||||
#else
|
||||
// The default context is utilized for each Intel GPU device, allowing the
|
||||
// retrieval of the context from any GPU device.
|
||||
const auto& platform = gDevicePool.devices[0]->get_platform();
|
||||
@ -156,7 +146,6 @@ inline void initGlobalDevicePoolState() {
|
||||
#else
|
||||
platform.ext_oneapi_get_default_context());
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
inline void initDevicePoolCallOnce() {
|
||||
@ -181,9 +170,9 @@ void initDeviceProperties(DeviceProp* device_prop, DeviceIndex device) {
|
||||
#define ASSIGN_DEVICE_ASPECT(member) \
|
||||
device_prop->has_##member = raw_device.has(sycl::aspect::member);
|
||||
|
||||
#define ASSIGN_EXP_CL_ASPECT(member) \
|
||||
device_prop->has_##member = raw_device.ext_oneapi_supports_cl_extension( \
|
||||
"cl_intel_" #member, &cl_version);
|
||||
#define ASSIGN_EXP_CL_ASPECT(member) \
|
||||
device_prop->has_##member = \
|
||||
raw_device.ext_oneapi_supports_cl_extension("cl_intel_" #member);
|
||||
|
||||
#define ASSIGN_EXP_DEVICE_PROP(property) \
|
||||
device_prop->property = \
|
||||
@ -198,8 +187,6 @@ void initDeviceProperties(DeviceProp* device_prop, DeviceIndex device) {
|
||||
|
||||
AT_FORALL_XPU_DEVICE_ASPECT(ASSIGN_DEVICE_ASPECT);
|
||||
|
||||
// TODO: Remove cl_version since it is unnecessary.
|
||||
sycl::ext::oneapi::experimental::cl_version cl_version;
|
||||
AT_FORALL_XPU_EXP_CL_ASPECT(ASSIGN_EXP_CL_ASPECT);
|
||||
|
||||
#if SYCL_COMPILER_VERSION >= 20250000
|
||||
|
Reference in New Issue
Block a user