MCPcopy Create free account
hub / github.com/NVIDIA/TensorRT / free

Method free

python/src/infer/pyCore.cpp:417–438  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

415 }
416
417 void free(void* memory) noexcept override
418 {
419 try
420 {
421 py::gil_scoped_acquire gil{};
422 py::function pyFree = utils::getOverride(static_cast<IGpuAllocator*>(this), "free");
423 if (!pyFree)
424 {
425 return;
426 }
427
428 pyFree(reinterpret_cast<size_t>(memory));
429 }
430 catch (std::exception const& e)
431 {
432 std::cerr << "[ERROR] Exception caught in free(): " << e.what() << std::endl;
433 }
434 catch (...)
435 {
436 std::cerr << "[ERROR] Exception caught in free()" << std::endl;
437 }
438 }
439
440 bool deallocate(void* memory) noexcept override
441 {

Callers

nothing calls this directly

Calls 1

getOverrideFunction · 0.85

Tested by

no test coverage detected