@@ -20,101 +20,101 @@ Device::DeviceType CpuGuardImpl::Type() const { return Device::DeviceType::kCPU;
2020void CpuGuardImpl::SetDevice (Device device) const {
2121 // No-op for CPU
2222 CHECK (device.type () == Device::DeviceType::kCPU );
23- LOG (WARNING ) << " CpuGuardImpl::SetDevice is not supported. "
24- " The call is ignored." ;
23+ VLOG ( 3 ) << " CpuGuardImpl::SetDevice is not supported. "
24+ " The call is ignored." ;
2525}
2626
2727int CpuGuardImpl::DeviceCount () const { return 1 ; }
2828
2929Stream *CpuGuardImpl::GetStream (Device device) const {
3030 CHECK (device.type () == Device::DeviceType::kCPU );
31- LOG (WARNING ) << " CpuGuardImpl::GetStream is not supported. "
32- " Return nullptr." ;
31+ VLOG ( 3 ) << " CpuGuardImpl::GetStream is not supported. "
32+ " Return nullptr." ;
3333 return nullptr ;
3434}
3535
3636Stream *CpuGuardImpl::CreateStream (Device device) const {
3737 CHECK (device.type () == Device::DeviceType::kCPU );
38- LOG (WARNING ) << " CpuGuardImpl::CreateStream is not supported. "
39- " Return nullptr." ;
38+ VLOG ( 3 ) << " CpuGuardImpl::CreateStream is not supported. "
39+ " Return nullptr." ;
4040 return nullptr ;
4141}
4242
4343Stream *CpuGuardImpl::CreateStreamWithPriority (Device device, int priority) const {
4444 CHECK (device.type () == Device::DeviceType::kCPU );
45- LOG (WARNING ) << " CpuGuardImpl::CreateStreamWithPriority is not supported. "
46- " Return nullptr." ;
45+ VLOG ( 3 ) << " CpuGuardImpl::CreateStreamWithPriority is not supported. "
46+ " Return nullptr." ;
4747 return nullptr ;
4848}
4949
5050void CpuGuardImpl::DestroyStream (Stream *stream) const {
51- LOG (WARNING ) << " CpuGuardImpl::DestroyStream is not supported. "
52- " The call is ignored." ;
51+ VLOG ( 3 ) << " CpuGuardImpl::DestroyStream is not supported. "
52+ " The call is ignored." ;
5353}
5454
5555void CpuGuardImpl::GetStreamPriorityRange (int *low, int *high) const {
5656 *low = 0 ;
5757 *high = 0 ;
58- LOG (WARNING ) << " CpuGuardImpl::GetStreamPriorityRange is not supported. "
59- " Return range [0, 0]." ;
58+ VLOG ( 3 ) << " CpuGuardImpl::GetStreamPriorityRange is not supported. "
59+ " Return range [0, 0]." ;
6060}
6161
6262void CpuGuardImpl::EventCreate (Event **event) const {
6363 CHECK_NOTNULL (event);
64- LOG (WARNING ) << " CpuGuardImpl::EventCreate is not supported. Returning nullptr event." ;
64+ VLOG ( 3 ) << " CpuGuardImpl::EventCreate is not supported. Returning nullptr event." ;
6565 *event = nullptr ;
6666}
6767
6868void CpuGuardImpl::EventCreateWithFlags (Event **event, EventFlag flags) const {
6969 CHECK_NOTNULL (event);
70- LOG (WARNING ) << " CpuGuardImpl::EventCreateWithFlags is not supported. Returning nullptr event." ;
70+ VLOG ( 3 ) << " CpuGuardImpl::EventCreateWithFlags is not supported. Returning nullptr event." ;
7171 *event = nullptr ;
7272}
7373
7474void CpuGuardImpl::EventDestroy (Event *event) const {
75- LOG (WARNING ) << " CpuGuardImpl::EventDestroy is not supported. The call is ignored." ;
75+ VLOG ( 3 ) << " CpuGuardImpl::EventDestroy is not supported. The call is ignored." ;
7676}
7777
7878void CpuGuardImpl::EventRecord (Event *event, Stream *stream) const {
79- LOG (WARNING ) << " CpuGuardImpl::EventRecord is not supported. The call is ignored." ;
79+ VLOG ( 3 ) << " CpuGuardImpl::EventRecord is not supported. The call is ignored." ;
8080}
8181
8282void CpuGuardImpl::StreamWaitEvent (Stream *stream, Event *event, uint32_t flags) const {
83- LOG (WARNING ) << " CpuGuardImpl::StreamWaitEvent is not supported. The call is ignored." ;
83+ VLOG ( 3 ) << " CpuGuardImpl::StreamWaitEvent is not supported. The call is ignored." ;
8484}
8585
8686RuntimeStatus CpuGuardImpl::EventSynchronize (Event *event) const {
87- LOG (WARNING ) << " CpuGuardImpl::EventSynchronize is not supported. Returning kError." ;
87+ VLOG ( 3 ) << " CpuGuardImpl::EventSynchronize is not supported. Returning kError." ;
8888 return RuntimeStatus::kError ;
8989}
9090
9191RuntimeStatus CpuGuardImpl::EventQuery (Event *event) const {
92- LOG (WARNING ) << " CpuGuardImpl::EventQuery is not supported. Returning kError." ;
92+ VLOG ( 3 ) << " CpuGuardImpl::EventQuery is not supported. Returning kError." ;
9393 return RuntimeStatus::kError ;
9494}
9595
9696float CpuGuardImpl::EventElapsedTime (Event *start_event, Event *stop_event) const {
97- LOG (WARNING ) << " CpuGuardImpl::EventElapsedTime is not supported. Returning 0." ;
97+ VLOG ( 3 ) << " CpuGuardImpl::EventElapsedTime is not supported. Returning 0." ;
9898 return 0 .0f ;
9999}
100100
101101void CpuGuardImpl::SynchronizeDevice (Device device) const {
102102 // No-op for CPU
103103 CHECK (device.type () == Device::DeviceType::kCPU );
104- LOG (WARNING ) << " CpuGuardImpl::SynchronizeDevice is not supported. "
105- " The call is ignored." ;
104+ VLOG ( 3 ) << " CpuGuardImpl::SynchronizeDevice is not supported. "
105+ " The call is ignored." ;
106106}
107107
108108void CpuGuardImpl::SynchronizeStream (Stream *) const {
109109 // No-op for CPU
110- LOG (WARNING ) << " CpuGuardImpl::SynchronizeStream is not supported. "
111- " The call is ignored." ;
110+ VLOG ( 3 ) << " CpuGuardImpl::SynchronizeStream is not supported. "
111+ " The call is ignored." ;
112112}
113113
114114BlasHandle *CpuGuardImpl::GetBlasHandle (Device device) const {
115115 CHECK (device.type () == Device::DeviceType::kCPU );
116- LOG (WARNING ) << " CpuGuardImpl::GetBlasHandle is not supported. "
117- " Return nullptr." ;
116+ VLOG ( 3 ) << " CpuGuardImpl::GetBlasHandle is not supported. "
117+ " Return nullptr." ;
118118 return nullptr ;
119119}
120120
@@ -123,12 +123,12 @@ void CpuGuardImpl::Malloc(void **dev_ptr, size_t size) { *dev_ptr = std::malloc(
123123void CpuGuardImpl::Free (void *dev_ptr) { std::free (dev_ptr); }
124124
125125void CpuGuardImpl::MallocAsync (void **dev_ptr, size_t size, Stream *stream) {
126- LOG (WARNING ) << " CpuGuardImpl::MallocAsync is not supported. Falling back to blocking Malloc()" ;
126+ VLOG ( 3 ) << " CpuGuardImpl::MallocAsync is not supported. Falling back to blocking Malloc()" ;
127127 Malloc (dev_ptr, size);
128128}
129129
130130void CpuGuardImpl::FreeAsync (void *dev_ptr, Stream *stream) {
131- LOG (WARNING ) << " CpuGuardImpl::FreeAsync is not supported. Falling back to blocking Free()" ;
131+ VLOG ( 3 ) << " CpuGuardImpl::FreeAsync is not supported. Falling back to blocking Free()" ;
132132 Free (dev_ptr);
133133}
134134
@@ -140,21 +140,21 @@ void CpuGuardImpl::Memcpy(void *dst, const void *src, size_t count, MemcpyKind k
140140}
141141
142142void CpuGuardImpl::MemcpyAsync (void *dst, const void *src, size_t count, MemcpyKind kind, Stream *stream) {
143- LOG (WARNING ) << " CpuGuardImpl::MemcpyAsync is not supported. Falling back to blocking Memcpy()" ;
143+ VLOG ( 3 ) << " CpuGuardImpl::MemcpyAsync is not supported. Falling back to blocking Memcpy()" ;
144144 Memcpy (dst, src, count, kind);
145145}
146146
147147void CpuGuardImpl::ResetMemPoolHighWatermarks (Device device) const {
148148 // No-op for CPU
149149 CHECK (device.type () == Device::DeviceType::kCPU );
150- LOG (WARNING ) << " CpuGuardImpl::ResetMemPoolHighWatermarks is not supported. "
151- " The call is ignored." ;
150+ VLOG ( 3 ) << " CpuGuardImpl::ResetMemPoolHighWatermarks is not supported. "
151+ " The call is ignored." ;
152152}
153153
154154std::pair<size_t , size_t > CpuGuardImpl::GetMemPoolPeakMB (Device device) const {
155155 CHECK (device.type () == Device::DeviceType::kCPU );
156- LOG (WARNING ) << " CpuGuardImpl::GetMemPoolPeakMB is not supported. "
157- " Return {0, 0}." ;
156+ VLOG ( 3 ) << " CpuGuardImpl::GetMemPoolPeakMB is not supported. "
157+ " Return {0, 0}." ;
158158 return {0 , 0 };
159159}
160160
0 commit comments