mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Refine XPU device prop and fix typo (#140661)
# Motivation `architecture` is an experimental attribute that might been used by triton AOT codegen. It should not be in `__repr__`. Pull Request resolved: https://github.com/pytorch/pytorch/pull/140661 Approved by: https://github.com/EikanWang
This commit is contained in:
committed by
PyTorch MergeBot
parent
9a051f6ee0
commit
ebeab262d9
@ -146,7 +146,7 @@ struct TORCH_XPU_API XPUEvent {
|
|||||||
// Block until both of the recorded events are completed.
|
// Block until both of the recorded events are completed.
|
||||||
uint64_t end_time_ns = other.event().get_profiling_info<command_end>();
|
uint64_t end_time_ns = other.event().get_profiling_info<command_end>();
|
||||||
uint64_t start_time_ns = event().get_profiling_info<command_end>();
|
uint64_t start_time_ns = event().get_profiling_info<command_end>();
|
||||||
// Return the eplased time in milliseconds.
|
// Return the elapsed time in milliseconds.
|
||||||
return 1e-6 *
|
return 1e-6 *
|
||||||
(static_cast<double>(end_time_ns) - static_cast<double>(start_time_ns));
|
(static_cast<double>(end_time_ns) - static_cast<double>(start_time_ns));
|
||||||
}
|
}
|
||||||
|
@ -159,7 +159,7 @@ struct XPUGuardImpl final : public c10::impl::DeviceGuardImplInterface {
|
|||||||
// Block until both of the recorded events are completed.
|
// Block until both of the recorded events are completed.
|
||||||
uint64_t end_time_ns = xpu_end_event->get_profiling_info<command_end>();
|
uint64_t end_time_ns = xpu_end_event->get_profiling_info<command_end>();
|
||||||
uint64_t start_time_ns = xpu_start_event->get_profiling_info<command_end>();
|
uint64_t start_time_ns = xpu_start_event->get_profiling_info<command_end>();
|
||||||
// Return the eplased time in milliseconds.
|
// Return the elapsed time in milliseconds.
|
||||||
return 1e-6 *
|
return 1e-6 *
|
||||||
(static_cast<double>(end_time_ns) - static_cast<double>(start_time_ns));
|
(static_cast<double>(end_time_ns) - static_cast<double>(start_time_ns));
|
||||||
}
|
}
|
||||||
|
@ -352,9 +352,6 @@ static void registerXpuDeviceProperties(PyObject* module) {
|
|||||||
<< get_device_type(prop) << "', driver_version='"
|
<< get_device_type(prop) << "', driver_version='"
|
||||||
<< prop.driver_version << "', total_memory="
|
<< prop.driver_version << "', total_memory="
|
||||||
<< prop.global_mem_size / (1024ull * 1024) << "MB"
|
<< prop.global_mem_size / (1024ull * 1024) << "MB"
|
||||||
#if SYCL_COMPILER_VERSION >= 20250000
|
|
||||||
<< ", architecture=" << get_device_architecture(prop)
|
|
||||||
#endif
|
|
||||||
<< ", max_compute_units=" << prop.max_compute_units
|
<< ", max_compute_units=" << prop.max_compute_units
|
||||||
<< ", gpu_eu_count=" << prop.gpu_eu_count
|
<< ", gpu_eu_count=" << prop.gpu_eu_count
|
||||||
<< ", gpu_subslice_count=" << gpu_subslice_count(prop)
|
<< ", gpu_subslice_count=" << gpu_subslice_count(prop)
|
||||||
|
Reference in New Issue
Block a user