juda commented on code in PR #12232: URL: https://github.com/apache/tvm/pull/12232#discussion_r934081517
########## src/contrib/torch/tvm_module_wrapper/runtime_bridge.h: ########## @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +/*! + * \file runtime_bridge.h + * \brief Util functions for pytorch tvm interaction. + */ +#ifndef TVM_CONTRIB_TORCH_TVM_MODULE_WRAPPER_RUNTIME_BRIDGE_H_ +#define TVM_CONTRIB_TORCH_TVM_MODULE_WRAPPER_RUNTIME_BRIDGE_H_ + +extern "C" { + +typedef DLManagedTensor** TensorList; + +struct DLPackTensorExt { + DLManagedTensor* dl_managed_tensor; + bool is_bool; +}; + +struct TVMContribTorchRuntimeModule; + +TVMContribTorchRuntimeModule* tvm_contrib_torch_get_last_saved_runtime_module(); + +void tvm_contrib_torch_operator_module_forward(TVMContribTorchRuntimeModule* runtime_module, + DLPackTensorExt* inputs, size_t input_size); + +int64_t tvm_contrib_torch_graph_executor_module_forward(TVMContribTorchRuntimeModule* graph_module, + DLPackTensorExt* inputs, size_t input_size, + DLPackTensorExt** outputs); Review Comment: Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
