Skip to content

Commit db2d814

Browse files
committed
rename extension
Signed-off-by: Sergey V Maslov <[email protected]>
1 parent 241e19d commit db2d814

File tree

7 files changed

+13
-14
lines changed

7 files changed

+13
-14
lines changed

sycl/doc/extensions/supported/sycl_ext_intel_device_info.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -366,23 +366,23 @@ The extension supports this query in version 4 and later.
366366

367367
| Device Descriptors | Return Type | Description |
368368
| ------------------ | ----------- | ----------- |
369-
| info\:\:device\:\:ext\_intel\_device\_info\_free\_memory | uint64\_t| Returns the memory avialble on the device in units of bytes.|
369+
| info\:\:device\:\:ext\_intel\_free\_memory | uint64\_t| Returns the memory avialble on the device in units of bytes.|
370370

371371

372372
## Aspects ##
373373

374-
A new aspect, ext\_intel\_device_\_info\_free\_memory, will be added.
374+
A new aspect, ext\_intel\_free\_memory, will be added.
375375

376376

377377
## Error Condition ##
378378

379-
An invalid object runtime error will be thrown if the device does not support aspect\:\:ext\_intel\_device_\_info\_free\_memory.
379+
An invalid object runtime error will be thrown if the device does not support aspect\:\:ext\_intel\_free\_memory.
380380

381381

382382
## Example Usage ##
383383

384384
Then the free device memory can be obtained using the standard get\_info() interface.
385385

386-
if (dev.has(aspect::ext_intel_device_info_free_memory)) {
387-
auto FreeMemory = dev.get_info<info::device::ext_intel_device_info_free_memory>();
386+
if (dev.has(aspect::ext_intel_free_memory)) {
387+
auto FreeMemory = dev.get_info<info::device::ext_intel_free_memory>();
388388
}

sycl/include/sycl/aspects.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ enum class aspect {
5151
ext_intel_gpu_hw_threads_per_eu = 33,
5252
ext_oneapi_cuda_async_barrier = 34,
5353
ext_oneapi_bfloat16 = 35,
54-
ext_intel_device_info_free_memory = 36,
54+
ext_intel_free_memory = 36,
5555
};
5656

5757
} // __SYCL_INLINE_VER_NAMESPACE(_V1)

sycl/include/sycl/info/device_traits.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ __SYCL_PARAM_TRAITS_SPEC(device, ext_oneapi_srgb, bool,
209209
PI_DEVICE_INFO_IMAGE_SRGB)
210210
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_device_info_uuid, detail::uuid_type,
211211
PI_DEVICE_INFO_UUID)
212-
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_device_info_free_memory, pi_uint64,
212+
__SYCL_PARAM_TRAITS_SPEC(device, ext_intel_free_memory, pi_uint64,
213213
PI_EXT_INTEL_DEVICE_INFO_FREE_MEMORY)
214214
__SYCL_PARAM_TRAITS_SPEC(device, ext_oneapi_max_global_work_groups, size_t,
215215
PI_EXT_ONEAPI_DEVICE_INFO_MAX_GLOBAL_WORK_GROUPS)

sycl/plugins/level_zero/pi_level_zero.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3141,12 +3141,11 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
31413141
std::vector<zes_mem_handle_t> MemHandles(MemCount);
31423142
ZE_CALL(zesDeviceEnumMemoryModules,
31433143
(ZeDevice, &MemCount, MemHandles.data()));
3144-
printf("# = %d\n", MemCount);
3144+
31453145
for (auto &ZesMemHandle : MemHandles) {
31463146
ZesStruct<zes_mem_state_t> ZeMemState;
31473147
ZE_CALL(zesMemoryGetState, (ZesMemHandle, &ZeMemState));
31483148
FreeMemory += ZeMemState.free;
3149-
printf("## += %lld\n", ZeMemState.free);
31503149
}
31513150
return ReturnValue(FreeMemory);
31523151
}

sycl/source/detail/device_impl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ bool device_impl::has(aspect Aspect) const {
347347
MDevice, PI_DEVICE_INFO_GPU_HW_THREADS_PER_EU,
348348
sizeof(pi_device_type), &device_type,
349349
&return_size) == PI_SUCCESS;
350-
case aspect::ext_intel_device_info_free_memory:
350+
case aspect::ext_intel_free_memory:
351351
return getPlugin().call_nocheck<detail::PiApiKind::piDeviceGetInfo>(
352352
MDevice, PI_EXT_INTEL_DEVICE_INFO_FREE_MEMORY,
353353
sizeof(pi_device_type), &device_type,

sycl/source/detail/device_info.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1363,7 +1363,7 @@ get_device_info_host<info::device::ext_intel_device_info_uuid>() {
13631363

13641364
template <>
13651365
inline uint64_t
1366-
get_device_info_host<info::device::ext_intel_device_info_free_memory>() {
1366+
get_device_info_host<info::device::ext_intel_free_memory>() {
13671367
throw runtime_error(
13681368
"Obtaining the device free memory is not supported on HOST device",
13691369
PI_ERROR_INVALID_DEVICE);

sycl/unittests/kernel-and-program/DeviceInfo.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,14 @@ TEST_F(DeviceInfoTest, GetDeviceFreeMemory) {
108108

109109
device Dev = Ctx.get_devices()[0];
110110

111-
if (!Dev.has(aspect::ext_intel_device_info_free_memory)) {
111+
if (!Dev.has(aspect::ext_intel_free_memory)) {
112112
std::clog << "This test is only for the devices with "
113-
"ext_intel_device_info_free_memory extension support.\n";
113+
"ext_intel_free_memory extension support.\n";
114114
return;
115115
}
116116

117117
auto FreeMemory =
118-
Dev.get_info<info::device::ext_intel_device_info_free_memory>();
118+
Dev.get_info<info::device::ext_intel_free_memory>();
119119

120120
EXPECT_EQ(TestContext->FreeMemoryInfoCalled, true)
121121
<< "Expect piDeviceGetInfo to be "

0 commit comments

Comments
 (0)