File tree Expand file tree Collapse file tree 2 files changed +3
-19
lines changed Expand file tree Collapse file tree 2 files changed +3
-19
lines changed Original file line number Diff line number Diff line change @@ -301,15 +301,10 @@ end
301301        foreach (free, argument_buffers)
302302
303303        #  Check for errors
304-         Core. println (buf. status)
304+         #  XXX : we cannot do this nicely, e.g. throwing an `error` or reporting with `@error`
305+         #       because we're not allowed to switch tasks from this contexts.
305306        if  buf. status ==  MTL. MTLCommandBufferStatusError
306-             err =  buf. error
307-             if  err != =  nothing 
308-                 code =  err. code  #  MTLCommandBufferError enum value
309-                 description =  err. localizedDescription
310- 
311- 		        @error  " GPU kernel execution failed" =  (err, catch_backtrace ()) kernel =  nameof (kernel. f) error_code =  code description =  description
312-             end 
307+             Core. println (" ERROR: Failed to submit command buffer: $(buf. error. localizedDescription) " 
313308        end 
314309
315310    end 
Original file line number Diff line number Diff line change 260260        @test  Array (a)[] ==  1 
261261    end 
262262end 
263- 
264- 
265- @testset  " error handling" begin 
266-     function  failing_kernel (arr, ptr)
267-         x =  unsafe_load (reinterpret (Ptr{Int}, ptr))
268-         @inbounds  arr[1 ] =  x
269-         return  nothing 
270-     end 
271- 
272-     @test_logs  (:error , r" GPU kernel execution failed" @metal  failing_kernel (mtl ([0 ], 0 ))
273- end 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments