masahi commented on code in PR #16980:
URL: https://github.com/apache/tvm/pull/16980#discussion_r1599001463


##########
src/runtime/cuda/cuda_device_api.cc:
##########
@@ -142,6 +142,24 @@ class CUDADeviceAPI final : public DeviceAPI {
   }
 
   void FreeDataSpace(Device dev, void* ptr) final {
+    if (std::uncaught_exceptions() && cudaPeekAtLastError() == 
cudaErrorIllegalAddress) {

Review Comment:
   I hope that `uncaught_exceptions()` is not going to add any overhead.



##########
src/runtime/cuda/cuda_device_api.cc:
##########
@@ -142,6 +142,24 @@ class CUDADeviceAPI final : public DeviceAPI {
   }
 
   void FreeDataSpace(Device dev, void* ptr) final {
+    if (std::uncaught_exceptions() && cudaPeekAtLastError() == 
cudaErrorIllegalAddress) {

Review Comment:
   I assume that `uncaught_exceptions()` is not going to add any overhead.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@tvm.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to