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:
Yu, Guangye
2024-11-14 05:51:55 +00:00
committed by PyTorch MergeBot
parent 9a051f6ee0
commit ebeab262d9
3 changed files with 2 additions and 5 deletions

View File

@ -146,7 +146,7 @@ struct TORCH_XPU_API XPUEvent {
// Block until both of the recorded events are completed.
uint64_t end_time_ns = other.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 *
(static_cast<double>(end_time_ns) - static_cast<double>(start_time_ns));
}

View File

@ -159,7 +159,7 @@ struct XPUGuardImpl final : public c10::impl::DeviceGuardImplInterface {
// Block until both of the recorded events are completed.
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>();
// Return the eplased time in milliseconds.
// Return the elapsed time in milliseconds.
return 1e-6 *
(static_cast<double>(end_time_ns) - static_cast<double>(start_time_ns));
}

View File

@ -352,9 +352,6 @@ static void registerXpuDeviceProperties(PyObject* module) {
<< get_device_type(prop) << "', driver_version='"
<< prop.driver_version << "', total_memory="
<< 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
<< ", gpu_eu_count=" << prop.gpu_eu_count
<< ", gpu_subslice_count=" << gpu_subslice_count(prop)