Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Runtime] Fix Potential DeviceAPIManager Memory Bug #14114

Merged
merged 1 commit into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion python/tvm/relay/function.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ def astext(self, show_meta_data=True, annotate=None):
return astext(self, show_meta_data, annotate)


@tvm._ffi.register_func("relay.FunctionWithFields")
def FunctionWithFields(
function,
params=None,
Expand Down
2 changes: 1 addition & 1 deletion src/runtime/c_runtime_api.cc
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ uint8_t ParseCustomDatatype(const std::string& s, const char** scan) {

class DeviceAPIManager {
public:
static const int kMaxDeviceAPI = 32;
static const int kMaxDeviceAPI = TVMDeviceExtType_End;
// Get API
static DeviceAPI* Get(const Device& dev) { return Get(dev.device_type); }
static DeviceAPI* Get(int dev_type, bool allow_missing = false) {
Expand Down