Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@ permissions:

jobs:
test:
runs-on: github-gpu
strategy:
matrix:
include:
- machine: github-gpu
- machine: macos-latest-xlarge
runs-on: ${{ matrix.machine }}
steps:
- uses: actions/checkout@v4

Expand Down
11 changes: 11 additions & 0 deletions scripts/debug_mac_gpu.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import Metal
guard let device = MTLCreateSystemDefaultDevice() else {
print("Error: Could not find Metal device.")
exit(1)
}
print("Name: \(device.name)")
print("Is Headless: \(device.isHeadless)")
print("Supports Raytracing: \(device.supportsRaytracing)")
print("Supports Dynamic Libraries: \(device.supportsDynamicLibraries)")
print("Max Buffer (GB): \(String(format: "%.2f", Double(device.maxBufferLength) / 1.0e9))")
print("Recommended Max VRAM (GB): \(String(format: "%.2f", Double(device.recommendedMaxWorkingSetSize) / 1.0e9))")
19 changes: 16 additions & 3 deletions solutions/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ detect_gpu_platform() {
fi

# Check for Apple Silicon (macOS)
if [[ "$OSTYPE" == "darwin"* ]]; then
if system_profiler SPDisplaysDataType 2>/dev/null | grep -q "Apple"; then
if [[ "$(uname -s)" == "Darwin" ]]; then
if [[ "$(uname -m)" == "arm64" ]]; then
echo "apple"
return
fi
fi
fi

echo "unknown"
}
Expand Down Expand Up @@ -534,6 +534,19 @@ print_startup_banner() {
local compute_cap=$(detect_gpu_compute_capability)
local gpu_name=""

# TEMPORARY Debugging MacOS CI issue
local mac_displays_info=$(system_profiler SPDisplaysDataType)
local mac_hardware_info=$(system_profiler SPHardwareDataType)
local mac_swift_debug=$(swift ../scripts/debug_mac_gpu.swift)
echo -e "Debug info about Mac displays:"
echo -e "$mac_displays_info"
echo -e "Debug info about Mac hardware:"
echo -e "$mac_hardware_info"
echo -e "Debug info from Swift:"
echo -e "$mac_swift_debug"

# End

echo -e "${BOLD}GPU Information:${NC}"
echo -e " ${BULLET} Platform: ${CYAN}$(echo "$gpu_platform" | tr '[:lower:]' '[:upper:]')${NC}"

Expand Down
Loading