tvm
debug.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  */
19 
24 #ifndef TVM_RUNTIME_DEBUG_H_
25 #define TVM_RUNTIME_DEBUG_H_
26 
28 #include <tvm/runtime/ndarray.h>
29 
30 #include <ostream>
31 #include <string>
32 
33 namespace tvm {
34 namespace runtime {
35 
42 void AppendNDArray(std::ostream& os, const NDArray& nd_array, const DLDevice& host_device,
43  bool show_content = true);
44 void AppendADT(std::ostream& os, const ADT& adt, const DLDevice& host_device,
45  bool show_content = true);
46 void AppendRuntimeObject(std::ostream& os, const ObjectRef& object, const DLDevice& host_device,
47  bool show_content = true);
48 std::string RuntimeObject2String(const ObjectRef& object, const DLDevice& host_device,
49  bool show_content = true);
50 
51 } // namespace runtime
52 } // namespace tvm
53 
54 #endif // TVM_RUNTIME_DEBUG_H_
reference to algebraic data type objects.
Definition: adt.h:78
Managed NDArray. The array is backed by reference counted blocks.
Definition: ndarray.h:51
Base class of all object reference.
Definition: object.h:519
void AppendADT(std::ostream &os, const ADT &adt, const DLDevice &host_device, bool show_content=true)
void AppendRuntimeObject(std::ostream &os, const ObjectRef &object, const DLDevice &host_device, bool show_content=true)
std::string RuntimeObject2String(const ObjectRef &object, const DLDevice &host_device, bool show_content=true)
void AppendNDArray(std::ostream &os, const NDArray &nd_array, const DLDevice &host_device, bool show_content=true)
Helpers to describe runtime objects in human-friendly form. For nd_arrays we show their shapes and dt...
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
A device-independent managed NDArray abstraction.
Runtime ADT container types.