Skip to content

Instantly share code, notes, and snippets.

Last active Jul 21, 2020
What would you like to do?
import Cocoa
class ViewController: NSViewController {
@IBOutlet weak var label: NSTextField!
override func viewDidLoad() {
let devices = MTLCopyAllDevices()
guard let _ = devices.first else {
fatalError("Your GPU does not support Metal!")
label.stringValue = "Your system has the following GPU(s):\n"
for device in devices {
label.stringValue += "\(\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment