File tree Expand file tree Collapse file tree 1 file changed +18
-11
lines changed Expand file tree Collapse file tree 1 file changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -12,17 +12,24 @@ if !Sys.isapple()
1212             Skipping tests."""  
1313    Sys. exit ()
1414else  #  if Sys.isapple()
15-     archchecker =  occursin (read (` xcrun metal-arch --name` 
16-     if  archchecker (" Paravirtual" #  Virtualized graphics (probably Github Actions runners)
17-         @warn  """ Metal.jl succesfully loaded on macOS system with unsupported Paravirtual graphics.
18-                  This system is unsupported but should still load. 
19-                  Skipping tests."""  
20-         Sys. exit ()
21-     elseif  ! archchecker (" applegpu" #  Every other unsupported system (Intel or AMD graphics)
22-         @warn  """ Metal.jl succesfully loaded on macOS system with unsupported graphics.
23-                  This system is unsupported but should still load. 
24-                  Skipping tests."""  
25-         Sys. exit ()
15+     cmd =  pipeline (Cmd (` xcrun -f metal-arch` =  true ), stdout  =  devnull , stderr  =  devnull )
16+     is_xcode_present =  run (cmd). exitcode ==  0 
17+ 
18+     if  is_xcode_present
19+         archchecker =  occursin (read (` xcrun metal-arch --name` 
20+         if  archchecker (" Paravirtual" #  Virtualized graphics (probably Github Actions runners)
21+             @warn  """ Metal.jl succesfully loaded on macOS system with unsupported Paravirtual graphics.
22+                     This system is unsupported but should still load. 
23+                     Skipping tests."""  
24+             Sys. exit ()
25+         elseif  ! archchecker (" applegpu" #  Every other unsupported system (Intel or AMD graphics)
26+             @warn  """ Metal.jl succesfully loaded on macOS system with unsupported graphics.
27+                     This system is unsupported but should still load. 
28+                     Skipping tests."""  
29+             Sys. exit ()
30+         end 
31+     else 
32+         @info  " GPU architecture could not be detected, assuming supported device." 
2633    end 
2734end 
2835
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments