OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
L0MgrNoL0.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2022 HEAVY.AI, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include "L0Mgr.h"
18 #include "Logger/Logger.h"
19 
20 namespace l0 {
21 
22 const std::vector<std::shared_ptr<L0Device>>& L0Driver::devices() const {
23  CHECK(false);
24  return devices_;
25 }
26 
27 std::shared_ptr<L0CommandQueue> L0Device::command_queue() const {
28  CHECK(false);
29  return nullptr;
30 }
31 std::unique_ptr<L0CommandList> L0Device::create_command_list() const {
32  CHECK(false);
33  return nullptr;
34 }
35 
36 std::shared_ptr<L0Module> L0Device::create_module(uint8_t* code,
37  size_t len,
38  bool log) const {
39  CHECK(false);
40  return nullptr;
41 }
42 
43 std::shared_ptr<L0Kernel> L0Module::create_kernel(const char* name,
44  uint32_t x,
45  uint32_t y,
46  uint32_t z) const {
47  CHECK(false);
48  return nullptr;
49 }
50 
51 void L0CommandList::copy(void* dst, const void* src, const size_t num_bytes) {
52  CHECK(false);
53 }
54 
55 void L0CommandList::submit(L0CommandQueue& queue) {
56  CHECK(false);
57 }
58 
59 void* allocate_device_mem(const size_t num_bytes, L0Device& device) {
60  CHECK(false);
61  return nullptr;
62 }
63 
65 
66 void L0Manager::copyHostToDevice(int8_t* device_ptr,
67  const int8_t* host_ptr,
68  const size_t num_bytes,
69  const int device_num) {
70  CHECK(false);
71 }
72 void L0Manager::copyDeviceToHost(int8_t* host_ptr,
73  const int8_t* device_ptr,
74  const size_t num_bytes,
75  const int device_num) {
76  CHECK(false);
77 }
78 void L0Manager::copyDeviceToDevice(int8_t* dest_ptr,
79  int8_t* src_ptr,
80  const size_t num_bytes,
81  const int dest_device_num,
82  const int src_device_num) {
83  CHECK(false);
84 }
85 
86 int8_t* L0Manager::allocatePinnedHostMem(const size_t num_bytes) {
87  CHECK(false);
88  return nullptr;
89 }
90 int8_t* L0Manager::allocateDeviceMem(const size_t num_bytes, const int device_num) {
91  CHECK(false);
92  return nullptr;
93 }
94 void L0Manager::freePinnedHostMem(int8_t* host_ptr) {
95  CHECK(false);
96 }
97 void L0Manager::freeDeviceMem(int8_t* device_ptr) {
98  CHECK(false);
99 }
100 void L0Manager::zeroDeviceMem(int8_t* device_ptr,
101  const size_t num_bytes,
102  const int device_num) {
103  CHECK(false);
104 }
105 void L0Manager::setDeviceMem(int8_t* device_ptr,
106  const unsigned char uc,
107  const size_t num_bytes,
108  const int device_num) {
109  CHECK(false);
110 }
111 
112 void L0Manager::synchronizeDevices() const {
113  CHECK(false);
114 }
115 
116 const std::vector<std::shared_ptr<L0Driver>>& L0Manager::drivers() const {
117  return drivers_;
118 }
119 } // namespace l0
void freeDeviceMem(int8_t *device_ptr)
Definition: L0Mgr.cpp:307
void zeroDeviceMem(int8_t *device_ptr, const size_t num_bytes, const int device_num)
Definition: L0Mgr.cpp:312
void copyHostToDevice(int8_t *device_ptr, const int8_t *host_ptr, const size_t num_bytes, const int device_num)
Definition: L0Mgr.cpp:266
void setDeviceMem(int8_t *device_ptr, const unsigned char uc, const size_t num_bytes, const int device_num)
Definition: L0Mgr.cpp:317
std::unique_ptr< L0CommandList > create_command_list() const
Definition: L0Mgr.cpp:146
std::shared_ptr< L0Module > create_module(uint8_t *code, size_t len, bool log=false) const
Definition: L0Mgr.cpp:171
void copy(void *dst, const void *src, const size_t num_bytes)
Definition: L0Mgr.cpp:99
void submit(L0CommandQueue &queue)
Definition: L0Mgr.cpp:84
std::shared_ptr< L0CommandQueue > command_queue() const
Definition: L0Mgr.cpp:142
void copyDeviceToDevice(int8_t *dest_ptr, int8_t *src_ptr, const size_t num_bytes, const int dest_device_num, const int src_device_num)
Definition: L0Mgr.cpp:290
std::vector< std::shared_ptr< L0Device > > devices_
Definition: L0Mgr.h:35
void synchronizeDevices() const
Definition: L0Mgr.cpp:328
void copyDeviceToHost(int8_t *host_ptr, const int8_t *device_ptr, const size_t num_bytes, const int device_num)
Definition: L0Mgr.cpp:278
void freePinnedHostMem(int8_t *host_ptr)
Definition: L0Mgr.cpp:303
const std::vector< std::shared_ptr< L0Driver > > & drivers() const
Definition: L0Mgr.cpp:209
#define CHECK(condition)
Definition: Logger.h:291
int8_t * allocatePinnedHostMem(const size_t num_bytes)
Definition: L0Mgr.cpp:298
std::vector< std::shared_ptr< L0Driver > > drivers_
Definition: L0Mgr.h:210
void * allocate_device_mem(const size_t num_bytes, L0Device &device)
Definition: L0Mgr.cpp:105
int8_t * allocateDeviceMem(const size_t num_bytes, const int device_num)
Definition: L0Mgr.cpp:213
string name
Definition: setup.in.py:72
const std::vector< std::shared_ptr< L0Device > > & devices() const
Definition: L0Mgr.cpp:63
std::shared_ptr< L0Kernel > create_kernel(const char *name, uint32_t x, uint32_t y, uint32_t z) const
Definition: L0Mgr.cpp:231