This is an automated email from the ASF dual-hosted git repository. tqchen pushed a commit to branch refactor-s1 in repository https://gitbox.apache.org/repos/asf/tvm.git
commit 30343f01db6034efb9ddebc9818bee54eb59c4ca Author: tqchen <[email protected]> AuthorDate: Mon Apr 14 09:27:37 2025 -0400 [FFI] Add up more object info --- ffi/include/tvm/ffi/object.h | 1 + ffi/include/tvm/ffi/string.h | 2 +- ffi/src/ffi/object.cc | 1 + ffi/src/ffi/traceback.cc | 3 +-- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ffi/include/tvm/ffi/object.h b/ffi/include/tvm/ffi/object.h index 8a5f535ecb..f8d3b7e0a9 100644 --- a/ffi/include/tvm/ffi/object.h +++ b/ffi/include/tvm/ffi/object.h @@ -50,6 +50,7 @@ struct StaticTypeKey { static constexpr const char* kTVMFFIDataType = "DataType"; static constexpr const char* kTVMFFIDevice = "Device"; static constexpr const char* kTVMFFIRawStr = "const char*"; + static constexpr const char* kTVMFFIByteArrayPtr = "TVMFFIByteArray*"; static constexpr const char* kTVMFFIObjectRValueRef = "ObjectRValueRef"; }; diff --git a/ffi/include/tvm/ffi/string.h b/ffi/include/tvm/ffi/string.h index 51a1ecc810..3ffc358d7d 100644 --- a/ffi/include/tvm/ffi/string.h +++ b/ffi/include/tvm/ffi/string.h @@ -456,7 +456,7 @@ struct TypeTraits<TVMFFIByteArray*> : public TypeTraitsBase { return std::nullopt; } - static TVM_FFI_INLINE std::string TypeStr() { return "TVMFFIByteArray*"; } + static TVM_FFI_INLINE std::string TypeStr() { return StaticTypeKey::kTVMFFIByteArrayPtr; } }; template <> diff --git a/ffi/src/ffi/object.cc b/ffi/src/ffi/object.cc index 2b5dc1d83a..eeaf857115 100644 --- a/ffi/src/ffi/object.cc +++ b/ffi/src/ffi/object.cc @@ -249,6 +249,7 @@ class TypeTable { ReserveBuiltinTypeIndex(StaticTypeKey::kTVMFFIOpaquePtr, TypeIndex::kTVMFFIOpaquePtr); ReserveBuiltinTypeIndex(StaticTypeKey::kTVMFFIDataType, TypeIndex::kTVMFFIDataType); ReserveBuiltinTypeIndex(StaticTypeKey::kTVMFFIDevice, TypeIndex::kTVMFFIDevice); + ReserveBuiltinTypeIndex(StaticTypeKey::kTVMFFIByteArrayPtr, TypeIndex::kTVMFFIByteArrayPtr); ReserveBuiltinTypeIndex(StaticTypeKey::kTVMFFIObjectRValueRef, TypeIndex::kTVMFFIObjectRValueRef); } diff --git a/ffi/src/ffi/traceback.cc b/ffi/src/ffi/traceback.cc index 48ea393e4c..897b054d29 100644 --- a/ffi/src/ffi/traceback.cc +++ b/ffi/src/ffi/traceback.cc @@ -72,8 +72,7 @@ void BacktraceErrorCallback(void*, const char*, int) { // do nothing } -void BacktraceSyminfoCallback(void* data, uintptr_t pc, const char* symname, uintptr_t, - uintptr_t) { +void BacktraceSyminfoCallback(void* data, uintptr_t pc, const char* symname, uintptr_t, uintptr_t) { auto str = reinterpret_cast<std::string*>(data); if (symname != nullptr) {
