Skip to content

Commit

Permalink
Remove manual destruction in object lifetime tests for Vulkan
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek Gerstmann committed Nov 26, 2024
1 parent 5bd7b41 commit bf0bdda
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 24 deletions.
6 changes: 0 additions & 6 deletions test/correctness/gpu_object_lifetime_1.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ int main(int argc, char *argv[]) {
}
}

// Manually invoke the Vulkan destructor (since we can't do this automatically at exit)
if (target.has_feature(Target::Vulkan)) {
const auto *interface = get_device_interface_for_device_api(DeviceAPI::Vulkan, target);
interface->device_release(nullptr, interface);
}

Halide::Internal::JITSharedRuntime::release_all();

int ret = tracker.validate_gpu_object_lifetime(true /* allow_globals */, true /* allow_none */, 1 /* max_globals */);
Expand Down
6 changes: 0 additions & 6 deletions test/correctness/gpu_object_lifetime_2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,6 @@ int main(int argc, char *argv[]) {
h.realize({256}, target);
}

// Manually invoke the Vulkan destructor (since we can't do this automatically at exit)
if (target.has_feature(Target::Vulkan)) {
const auto *interface = get_device_interface_for_device_api(DeviceAPI::Vulkan, target);
interface->device_release(nullptr, interface);
}

Internal::JITSharedRuntime::release_all();

int ret = tracker.validate_gpu_object_lifetime(true /* allow_globals */, true /* allow_none */, 1 /* max_globals */);
Expand Down
6 changes: 0 additions & 6 deletions test/correctness/gpu_object_lifetime_3.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,6 @@ int main(int argc, char *argv[]) {
output.realize({256}, target);
}

// Manually invoke the Vulkan destructor (since we can't do this automatically at exit)
if (target.has_feature(Target::Vulkan)) {
const auto *interface = get_device_interface_for_device_api(DeviceAPI::Vulkan, target);
interface->device_release(nullptr, interface);
}

Internal::JITSharedRuntime::release_all();

int ret = tracker.validate_gpu_object_lifetime(true /* allow_globals */, true /* allow_none */, 1 /* max_globals */);
Expand Down
6 changes: 0 additions & 6 deletions test/correctness/leak_device_memory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,6 @@ int main(int argc, char **argv) {
}
}

// Manually invoke the Vulkan destructor (since we can't do this automatically at exit)
if (target.has_feature(Target::Vulkan)) {
const auto *interface = get_device_interface_for_device_api(DeviceAPI::Vulkan, target);
interface->device_release(nullptr, interface);
}

Halide::Internal::JITSharedRuntime::release_all();

assert(!buf.has_device_allocation());
Expand Down

0 comments on commit bf0bdda

Please sign in to comment.