Forgetive CI 3 сар өмнө
parent
commit
26e9202345

BIN
.DS_Store


+ 2 - 0
gputest.xcodeproj/project.pbxproj

@@ -251,6 +251,7 @@
 				CODE_SIGN_STYLE = Automatic;
 				DEVELOPMENT_TEAM = QM43SUA9CG;
 				ENABLE_HARDENED_RUNTIME = YES;
+				MACOSX_DEPLOYMENT_TARGET = 13.5;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_VERSION = 5.0;
 			};
@@ -262,6 +263,7 @@
 				CODE_SIGN_STYLE = Automatic;
 				DEVELOPMENT_TEAM = QM43SUA9CG;
 				ENABLE_HARDENED_RUNTIME = YES;
+				MACOSX_DEPLOYMENT_TARGET = 13.5;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SWIFT_VERSION = 5.0;
 			};

BIN
gputest.xcodeproj/project.xcworkspace/xcuserdata/xcbosa.xcuserdatad/UserInterfaceState.xcuserstate


+ 2 - 2
gputest.xcodeproj/xcshareddata/xcschemes/gputest.xcscheme

@@ -32,8 +32,8 @@
    </TestAction>
    <LaunchAction
       buildConfiguration = "Release"
-      selectedDebuggerIdentifier = ""
-      selectedLauncherIdentifier = "Xcode.IDEFoundation.Launcher.PosixSpawn"
+      selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+      selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
       launchStyle = "0"
       useCustomWorkingDirectory = "NO"
       ignoresPersistentStateOnLaunch = "NO"

+ 6 - 0
gputest.xcodeproj/xcuserdata/xcbosa.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+   uuid = "FCEAA49E-25FD-4555-8276-C90146CFC5B3"
+   type = "1"
+   version = "2.0">
+</Bucket>

+ 9 - 0
gputest/MetalShader.metal → gputest/MetalSource.swift

@@ -1,3 +1,11 @@
+//
+//  MetalSource.swift
+//  gputest
+//
+//  Created by xingcheng on 2025/5/18.
+//
+
+let metalCode = """
 #include <metal_stdlib>
 using namespace metal;
 
@@ -35,3 +43,4 @@ kernel void optimized_fp16(
     
     buffer[tid] = x;
 }
+"""

+ 1 - 1
gputest/main.swift

@@ -24,7 +24,7 @@ class OptimizedMetalBenchmark {
         self.device = device
         self.commandQueue = commandQueue
         
-        let library = device.makeDefaultLibrary()!
+        let library = try! device.makeLibrary(source: metalCode, options: nil)
         let fp32Function = library.makeFunction(name: "optimized_fp32")!
         let fp16Function = library.makeFunction(name: "optimized_fp16")!