tvm
Loading...
Searching...
No Matches
abi.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_TIRX_OP_ABI_H_
25#define TVM_TIRX_OP_ABI_H_
26
27#include <tvm/ir/attrs.h>
28#include <tvm/ir/op.h>
29#include <tvm/ir/prim/expr.h>
30
31namespace tvm {
32namespace tirx {
33
42
51
60
69
78
102
112
123
128
137
145
158
167
177 ffi::Array<ffi::String> launch_params;
179 ffi::Array<ffi::String> launch_fields;
181 int64_t num_kernel_args{-1};
183 ffi::Map<ffi::String, int64_t> kernel_attrs;
184
185 static void RegisterReflection();
187};
188
197
206
217
228
229} // namespace tirx
230} // namespace tvm
231
232#endif // TVM_TIRX_OP_ABI_H_
Helpers for attribute objects.
Base class of all attribute class.
Definition attrs.h:50
Reference-counted handle to a canonical named operator.
Definition op.h:147
Canonical primitive operators and their registration.
TIR expressions.
TVM_TIRX_DLL const Op & call_ffi_kernel_op()
Launch a kernel using the packed-function argument convention.
TVM_TIRX_DLL const Op & abi_field_get_op()
Read a runtime structure field.
TVM_TIRX_DLL const Op & call_pure_extern_op()
Call a pure external C function with types supplied by the caller.
TVM_TIRX_DLL const Op & call_llvm_intrin_op()
Invoke an LLVM intrinsic.
TVM_TIRX_DLL const Op & abi_field_set_op()
Write a runtime structure field.
TVM_TIRX_DLL const Op & call_packed_lowered_op()
Invoke a packed function using an explicit argument stack.
TVMStructFieldKind
Definition abi.h:79
@ kDLTensorStrides
Definition abi.h:84
@ kDLTensorData
Definition abi.h:82
@ kDLTensorTypeLanes
Definition abi.h:88
@ kDLTensorNDim
Definition abi.h:85
@ kDLTensorDeviceId
Definition abi.h:90
@ kDLTensorKindBound_
Definition abi.h:92
@ kDLTensorDeviceType
Definition abi.h:91
@ kDLTensorShape
Definition abi.h:83
@ kTVMValueContent
Definition abi.h:94
@ kTVMFFIAnyUnionValue
Definition abi.h:97
@ kDLTensorTypeBits
Definition abi.h:87
@ kTVMValueKindBound_
Definition abi.h:98
@ kDLTensorTypeCode
Definition abi.h:86
@ kTVMFFIAnyZeroPadding
Definition abi.h:96
@ kDLTensorAddr
Definition abi.h:81
@ kInt64ArrayElem
Definition abi.h:100
@ kTVMFFIAnyTypeIndex
Definition abi.h:95
@ kDLTensorByteOffset
Definition abi.h:89
TVM_TIRX_DLL const Op & call_cpacked_op()
Invoke a C packed function.
TVM_TIRX_DLL const Op & stack_make_dltensor_op()
Construct a stack-allocated DLTensor.
TVM_TIRX_DLL const Op & call_spirv_pure_glsl450_op()
Invoke a pure GLSL450 SPIR-V intrinsic.
TVM_TIRX_DLL const Op & stack_make_shape_op()
Construct a stack-allocated shape tuple.
TVM_TIRX_DLL const Op & stack_alloca_op()
Allocate stack storage for runtime values.
TVM_TIRX_DLL const Op & throw_last_error_op()
Raise the last runtime error.
TVM_TIRX_DLL const Op & call_packed_op()
Invoke a runtime packed function.
TVM_TIRX_DLL const Op & call_cpacked_lowered_op()
Invoke a C packed function using an explicit argument stack.
TVM_TIRX_DLL const Op & call_llvm_pure_intrin_op()
Invoke a pure LLVM intrinsic.
TVM_TIRX_DLL const Op & call_extern_op()
Call an external C function with argument and result types supplied by the caller.
An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.
Definition attr.h:23
#define TVM_TIRX_DLL
Definition base.h:83
Launch metadata for call_ffi_kernel.
Definition abi.h:169
ffi::Array< ffi::String > launch_fields
CUDA configuration field names, one per trailing operand.
Definition abi.h:179
int64_t num_kernel_args
Exact number of device parameters, excluding symbol and launch operands.
Definition abi.h:181
static void RegisterReflection()
TVM_FFI_DECLARE_OBJECT_INFO_FINAL("tirx.CallFFIKernelAttr", CallFFIKernelAttr, AttrsNode)
ffi::Array< ffi::String > launch_params
Ordered launch tags describing the suffix of the call arguments.
Definition abi.h:177
ffi::Map< ffi::String, int64_t > kernel_attrs
Compile-time CUDA kernel requirements.
Definition abi.h:183