File tree Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Expand file tree Collapse file tree 1 file changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -994,16 +994,11 @@ static inline void wait_and_free(void *ptr,
994994// / Free the memory \p ptr on the default queue without synchronizing
995995// / \param ptr Point to free.
996996// / \returns no return value.
997- // TODO(joe) in dpct this defers to detail::dpct_free
998- // Need this to handle the wait()
999997static inline void free (void *ptr, sycl::queue q = get_default_queue()) {
1000- if (ptr) {
1001- #ifdef COMPAT_USM_LEVEL_NONE
1002- detail::mem_mgr::instance ().mem_free (ptr);
1003- #else
1004- sycl::free (ptr, q);
1005- #endif // COMPAT_USM_LEVEL_NONE
1006- }
998+ #ifndef COMPAT_USM_LEVEL_NONE
999+ get_device (get_device_id (q.get_device ())).queues_wait_and_throw ();
1000+ #endif
1001+ detail::free (ptr, q);
10071002}
10081003
10091004// / Enqueues the release of all pointers in /p pointers on the /p q.
You can’t perform that action at this time.
0 commit comments