File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -309,6 +309,7 @@ PbTensor::LoadFromSharedMemory(
309309
310310      cudaError_t err = cudaIpcOpenMemHandle (
311311          (void **)&data, *cuda_ipc_mem_handle, cudaIpcMemLazyEnablePeerAccess);
312+ 
312313      if  (err != cudaSuccess) {
313314        throw  PythonBackendException (std::string (
314315                                         " failed to open cuda ipc handle: "   +
@@ -324,6 +325,7 @@ PbTensor::LoadFromSharedMemory(
324325          tensor_shm->dtype , raw_data->memory_type , raw_data->memory_type_id ,
325326          data, raw_data->byte_size , nullptr  /*  DLManaged Tensor */  );
326327      pb_tensor->cuda_ipc_mem_handle_  = cuda_ipc_mem_handle;
328+       pb_tensor->destruct_cuda_ipc_mem_handle_  = true ;
327329    } else  {
328330      pb_tensor = std::make_shared<PbTensor>(
329331          name, std::vector<int64_t >(dims, dims + dims_count),
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments