revert format

This commit is contained in:
luoyu-intel 2024-06-19 08:26:06 +00:00
parent e1eabdc2e4
commit 8a3d501cda

View file

@ -556,7 +556,7 @@ namespace dpct
Use 3200000 kHz as memory_clock_rate default value. \ Use 3200000 kHz as memory_clock_rate default value. \
Use 64 bits as memory_bus_width default value.") Use 64 bits as memory_bus_width default value.")
#else #else
#warning "get_device_info: querying memory_clock_rate and \ #warning "get_device_info: querying memory_clock_rate and \
memory_bus_width are not supported by the compiler used. \ memory_bus_width are not supported by the compiler used. \
Use 3200000 kHz as memory_clock_rate default value. \ Use 3200000 kHz as memory_clock_rate default value. \
Use 64 bits as memory_bus_width default value." Use 64 bits as memory_bus_width default value."
@ -666,7 +666,7 @@ namespace dpct
#if defined(_MSC_VER) && !defined(__clang__) #if defined(_MSC_VER) && !defined(__clang__)
#pragma message("Querying the number of bytes of free memory is not supported") #pragma message("Querying the number of bytes of free memory is not supported")
#else #else
#warning "Querying the number of bytes of free memory is not supported" #warning "Querying the number of bytes of free memory is not supported"
#endif #endif
#endif #endif
} }
@ -803,6 +803,7 @@ namespace dpct
mutable mutex_type m_mutex; mutable mutex_type m_mutex;
}; };
/// device manager /// device manager
class dev_mgr class dev_mgr
{ {
@ -2831,21 +2832,21 @@ namespace dpct
_device_ptr(memory_ptr) {} _device_ptr(memory_ptr) {}
void allocate_device(sycl::queue &q) { void allocate_device(sycl::queue &q) {
#ifndef DPCT_USM_LEVEL_NONE #ifndef DPCT_USM_LEVEL_NONE
if (Memory == shared) { if (Memory == shared) {
_device_ptr = (value_t *)sycl::malloc_shared(_size, q.get_device(), _device_ptr = (value_t *)sycl::malloc_shared(_size, q.get_device(),
q.get_context()); q.get_context());
return; return;
} }
#ifdef SYCL_EXT_ONEAPI_USM_DEVICE_READ_ONLY #ifdef SYCL_EXT_ONEAPI_USM_DEVICE_READ_ONLY
if (Memory == constant) { if (Memory == constant) {
_device_ptr = (value_t *)sycl::malloc_device( _device_ptr = (value_t *)sycl::malloc_device(
_size, q.get_device(), q.get_context(), _size, q.get_device(), q.get_context(),
sycl::ext::oneapi::property::usm::device_read_only()); sycl::ext::oneapi::property::usm::device_read_only());
return; return;
} }
#endif #endif
#endif #endif
_device_ptr = (value_t *)detail::dpct_malloc(_size, q); _device_ptr = (value_t *)detail::dpct_malloc(_size, q);
} }