Apple Silicon

RSS for tag

Build apps, libraries, frameworks, plug-ins, and other executable code that run natively on Apple silicon.

Posts under Apple Silicon tag

200 Posts

Post

Replies

Boosts

Views

Activity

How to bind threads to performance (P) or efficiency (E) cores?
For some simulation work-loads I have, I would like to use the system to its full potential and therefore use both P and E cores. Splitting the work-load into individual tasks is not easily possible (the threads communicate with each other and run in semi-lockstep). I can allocate smaller portions of the domain to the E cores (and iteratively adjust this so they take the same amount of time as the P cores). But in order for this to work well, I need to ensure that a given thread (with its associated workload) is bound to the right type of core: *either* the performance (doing larger chunks of the domain) or the efficiency (doing smaller chunks of the domain) cores. What's the best way to do this? So far, I don't think thread-to-core affinity has been something that was choosable in macOS. The documentation mentioned the QoS classes, but which class(es) (or relative priorities) would I pick? c pthread_set_qos_class_self_np(QOS_CLASS_UTILITY, 0); The existing classifications don't really map well, the work is user-initiated (i.e. they launched a console application), but not a GUI program. Would I use 4 threads with QOS_CLASS_UTILITY and 4 with QOS_CLASS_BACKGROUND? Would I just use UTILITY with relative priority for performance vs. efficiency cores?
7
0
7.2k
Jun ’23
On-Demand Resources in iOS apps running on Apple silicon Macs
I'm trying to get my iOS app to work on Apple silicon Macs, but ODR (On-Demand Resources) don't seem to work. It seems like the Xcode doesn't even acknowledge existence of ODR in the project when run as an iOS app for Mac on my M1 MacBook Air. I've created a very simple Xcode project to verify the issue, which only has a single image tagged as ODR. Checking the Disk tab in the Debug navigator, the ODR is shown correctly when running on a simulator: ...Yet when run as an iOS app for Mac it simply shows No Resources: The beginAccessingResources(...) call predictably fails, too, with the following error: Error: Error Domain=AssetErrorDomain Code=7 "Invalid status code `404`" UserInfo={NSDebugDescription=Invalid status code `404`, NSUnderlyingError=0x600003fd5fb0 {Error Domain=AssetErrorDomain Code=1404 "(null)"}} There are other messages in the console that could be related to the issue. The first thing the app logs when run as an iOS app for Mac, is this message repeated several times: 2022-01-20 12:14:41.566305+0000 ODRTest[29926:333135] [default] could not create original path for node <FSNode 0x600003191ca0> { isDir = ?, path = '/private/var/folders/kw/g_lttmtn0yx747mvzjmbksbc0000gn/X/FE0DB2BA-8F2D-5783-9BE1-891F8E117EC9/d/Wrapper/ODRTest.app' }, proceeding: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" ODRTest is the name of the Xcode project I use to reproduce the issue. Nothing else is logged apart from these repeated messages and the ODR request error. The documentation here seems to explicitly suggest that ODR should work fine, so I'm guessing this is some odd configuration error on my machine — perhaps related to file system access? I've tried updating macOS and re-installing Xcode to latest from scratch to no avail. Anything else I'm missing here?
4
0
2.5k
Jun ’23
Mac Catalyst Required Device Capabilities
Hello, I have my largely iOS app running using Mac Catalyst, but I need to limit what Macs will be able to install it from the Mac App Store based on the GPU Family like MTLGPUFamily.mac2. Is that possible? Or I could limit it to Apple Silicon using the Designed for iPad target, but I would prefer to use Mac Catalyst instead of Designed for iPad. Is it possible to limit Mac Catalyst installs to Apple Silicon Macs? Side question: what capabilities are supported by MTLGPUFamily.mac2? I can't find it. My main interest is in CoreML inference acceleration. Thank you.
0
0
1.1k
Jun ’23
Building XCFramework and (consuming) app in same workspace
I'd like to build an XCFramework and the consuming app in a single workspace to make sure the latest version of the framework is bundled with the app. So both projects - framework and app - are bundled in a common workspace in Xcode; just as we are used to with regular frameworks. In the framework's project I'm creating the XCFramework as per Apple's instruction as a script-only target using xcodebuild -create-xcframework to bundle the individual framework binaries. Now I'd like to include the generated .xcframework in the app project. However, Xcode doesn’t seem to understand that the framework project target creating the XCFramework is actually creating output: I’ve added the XCFramework target as a dependency in the consuming project, it builds when the main project is built, but there’s no output to be selected in the Link with Libraries or Copy Frameworks steps of the app project Directly adding the framework via Finder as a folder from either Debug/Release folder doesn't make sense, which one would you pick? This is a trivial step for regular frameworks but apparently I'm overlooking something when dealing with the .xcframework. How to proceed? Thanks, Jay
0
0
1.2k
May ’23
M1 Xcode 12.5 can't paste clipboard
I can't paste anything into my simulator since switching to an M1 MacMini. I've tried ticking and unticking "automatically sync clipboard". I've also tried using the "send clipboard" option manually, but no success. I can seem to paste into safari on the simulator, but not any app I create in Xcode. I've tried multiple and even creating a new one fresh. I get the below snippet in the console complaining its unable to access some file. Looks like its an Xcode / M1 bug. I'm not running via rosetta. Does anyone know how to fix this, its become a real blocker for me testing my app 2021-06-11 12:00:28.656521+0100 camlKit-Example[3736:123707] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x15dde658 ed2a1267 ab2496d7 34f186ad ... ec431c65 02d68f35 }, _LSLine=409, WrongSimulatorHash={length = 32, bytes = 0xaf25dda9 e45baa35 610eaabd 5bc09901 ... 9cbe61f3 81d7b9d9 }} 2021-06-11 12:00:28.656878+0100 camlKit-Example[3736:123707] [db] _LSSchemaConfigureForStore failed with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x15dde658 ed2a1267 ab2496d7 34f186ad ... ec431c65 02d68f35 }, _LSLine=409, WrongSimulatorHash={length = 32, bytes = 0xaf25dda9 e45baa35 610eaabd 5bc09901 ... 9cbe61f3 81d7b9d9 }} 2021-06-11 12:00:28.656957+0100 camlKit-Example[3736:123707] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x15dde658 ed2a1267 ab2496d7 34f186ad ... ec431c65 02d68f35 }, _LSLine=409, WrongSimulatorHash={length = 32, bytes = 0xaf25dda9 e45baa35 610eaabd 5bc09901 ... 9cbe61f3 81d7b9d9 }} 2021-06-11 12:00:28.657397+0100 camlKit-Example[3736:123707] [claims] Upload preparation for claim 1B09A1C9-1B93-4AB0-B91D-F8789C91AB3C completed with error: Error Domain=NSCocoaErrorDomain Code=256 "The file “fb19cda6511c09d17006da7aefa63f10ea73f68b” couldn’t be opened." UserInfo={NSURL=file:///Users/simonmcloughlin/Library/Developer/CoreSimulator/Devices/CD0E07DE-8C9C-4466-978B-1F6E635EE0E2/data/Library/Caches/com.apple.Pasteboard/eb77e5f8f043896faf63b5041f0fbd121db984dd/fb19cda6511c09d17006da7aefa63f10ea73f68b, NSFilePath=/Users/simonmcloughlin/Library/Developer/CoreSimulator/Devices/CD0E07DE-8C9C-4466-978B-1F6E635EE0E2/data/Library/Caches/com.apple.Pasteboard/eb77e5f8f043896faf63b5041f0fbd121db984dd/fb19cda6511c09d17006da7aefa63f10ea73f68b, NSUnderlyingError=0x600002813ae0 {Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)"}}
58
10
36k
Apr ’23
Failed to build module, Apple Swift version 5.1.3 have features that aren't supported by this compiler, 'Apple Swift version 5.3.2
Get error in XCode 12.4 on my new Macbook Air M1: unable to load standard library for target 'arm64-apple-ios8.0' failed to build module 'SciChart' from its module interface; the compiler that produced it, 'Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)' On my old Macbook Pro 2016, with intel chip I don't have any troubles. Both my Macbook have the same XCode version 12.4 and the same Swift version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28) Target: x86_64-apple-darwin20.3.0 What I already done: Reinstall XCode; Changed Swift Language Version; Deleted VALID_ARCHS reference according Xcode 12 Beta 2 - unable to load standard library for target 'arm64-apple-ios14.0-simulator'. And nothing works to me. Please can you help me! How to solve it?
11
0
19k
Apr ’23
Failed assertion `destination datatype must be fp32' when using PyTorch with Metal Performance Shaders on A14 devices
Hello Apple Developer Community, I'm experiencing an issue when using PyTorch in combination with Metal Performance Shaders (MPS) on an A14 device. During the execution of the backward() function, I encounter the following error message: /AppleInternal/Library/BuildRoots/9941690d-bcf7-11ed-a645-863efbbaf80d/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShaders/MPSNDArray/Kernels/MPSNDArrayConvolutionA14.mm:4332: failed assertion `destination datatype must be fp32' I have already verified that both the input tensors and gradient tensors are of float32 datatype before the backward() function is called. However, the error seems to be originating from the MPS code, specifically within the MPSNDArrayConvolutionA14.mm file. Could you provide any guidance or recommendations on how to resolve this issue? Is there any specific constraint or requirement that I should be aware of when using MPS with PyTorch on A14 devices? I would greatly appreciate any help or suggestions. Thank you in advance for your support. Best regards, kiyotaka86
1
1
1.5k
Apr ’23
SwiftUI UITableView NSInternalInconsistencyException in M1 simulator
Hello, I have a weird bug that happens only on my M1 Mac mini when buiding for the simulator. It is the typical table view NSInternalInconsistencyException error: ** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'attempt to insert row 2 into section 0, but there are only 2 rows in section 0 after the update' The error is related to a table view instantiated and managed by SwiftUI so I have no control over datasources. The corresponding View has a list fed a fetched result, with this property: var recipes: FetchedResultsRecipe { fetchRequest.wrappedValue } The crash happens the I add an object to the NSManagedObjectContext that stores the app contents. It happens when performing a very simple and fundamental flow of my app (a recipes app: the action is "add a recipe", imagine that). I found the crash yesterday after moving the project to my new M1 Mac. I verified that there is no crash or warning on the device iPhone XR) or on my older 2018 MacBook Pro. Anyone with a suggestion, or similar bugs? Thanks, Davide
4
0
3.7k
Apr ’23
Why "Open using Rosetta" is still needed to run on Simulator?
Hi, We ported our app to Apple Silicon and we often need to run our apps on simulator. But to be able to run on Simulator, I need to enable "Open using Rosetta". Also, under Build Settings → Architectures → Excluded Architectures, I have arm64. So, with out the need of enabling Open using Rosetta, how wold I be able to run the app on simulator and other platforms - iOS, iPadOS and macOS? Thank you!
5
0
8.4k
Apr ’23
Any option to profile JIT code with Instruments?
Hi, I would like to use the Instruments Time Profiler to profile code of an emulator project. The code is generated by a JIT compiler at runtime. Unfortunately, Instruments only displays an address and it cannot even display the disassembly of that dynamically generated code region. The solution for x86_64 is to use VTune on Windows, the VTune JIT Profiling API allows to specify code regions and give them a name (and even specify source code). Is there something like that for Instruments, too? Or any other alternatives to profile JIT code on Apple Silicon? Thanks a lot in advance! Lyve
2
0
866
Apr ’23
How to Show current GPU usage via METAL®
on macOS silicon where memory is unified its now important to see how much memory is being used by the GPU, but unlike OpenGL which has been depreciated for some time, metal doesnt seem to have any "Driver Monitor Parameters" to be able to display this information. Example of OpenGL Parameters: https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/OpenGLDriverMonitorUserGuide/Glossary/Glossary.html Im looking for an equivalent for METAL® but haven't been able to find any, unless im overlooking everything in how metal is laid out idk. any ideas or sense of direction would be ideal. thanks for anyone who can help.
0
0
932
Apr ’23
Can no longer unit test iOS apps on Mac in Xcode 14.3
I have been using unit tests for iOS apps running on a mac (Designed For iPad destination). The reason is that I need to be able to test Metal code on an Apple Silicon GPU and I can't do that using the Simulator since it's treated as a different GPU. Since upgrading to Xcode 14.3 that no longer seems possible: It's telling me Unable to initialize test bundle from file .... The console seems to suggest it's a Sandbox violation. Can anyone from Apple confirm that this is intended? Are there any other ways to unit test iOS code on an Apple Silicon GPU?
1
0
945
Mar ’23
Incoming VoIP call MacOS 13.0+ (designed for iPad)
I creating application for VoIP calls on iOS all is working well, but after I try to migrate this app into MacOS I have some troubles with incoming calls, I don't receive call notification. Using CallKit which support MacOS from 13 version my current MacOS version is 13.1 (22C65) Device MacBook Air M2 2022 MacOS 13.1 (22C65) Xcode 14.2 (14C18)
1
1
968
Mar ’23
CPU Limiter on Instrument missing for xcode 14.2 on M1 mac mini
Hello, I have 2 problems currently tied to instruments on xcode 14.2 The first one: i currently use macbook pro 13' with intel processor and a mac mini M1. i am doing some signpost logging to measure my app performance on certain app lifetime period. The logging code is currently working in Macbook pro with intell processor, showing time spans of the intended signpost record. But with the same code, i cannot see result when i run it on Mac mini M1. The second one: Is about the instument settings. In intel macbook, the instument settings have CPU tab where i can limit my CPU core used for instrumentation. But on mac mini M1, i don't see any CPU tab on instrument setting, is this expected? ---will edit later--- img: Intel result img: mac mini M1 result ---will edit later--- img: Intel instument settings img: M1 Instrument settings
1
0
1.2k
Mar ’23
How to bind threads to performance (P) or efficiency (E) cores?
For some simulation work-loads I have, I would like to use the system to its full potential and therefore use both P and E cores. Splitting the work-load into individual tasks is not easily possible (the threads communicate with each other and run in semi-lockstep). I can allocate smaller portions of the domain to the E cores (and iteratively adjust this so they take the same amount of time as the P cores). But in order for this to work well, I need to ensure that a given thread (with its associated workload) is bound to the right type of core: *either* the performance (doing larger chunks of the domain) or the efficiency (doing smaller chunks of the domain) cores. What's the best way to do this? So far, I don't think thread-to-core affinity has been something that was choosable in macOS. The documentation mentioned the QoS classes, but which class(es) (or relative priorities) would I pick? c pthread_set_qos_class_self_np(QOS_CLASS_UTILITY, 0); The existing classifications don't really map well, the work is user-initiated (i.e. they launched a console application), but not a GUI program. Would I use 4 threads with QOS_CLASS_UTILITY and 4 with QOS_CLASS_BACKGROUND? Would I just use UTILITY with relative priority for performance vs. efficiency cores?
Replies
7
Boosts
0
Views
7.2k
Activity
Jun ’23
On-Demand Resources in iOS apps running on Apple silicon Macs
I'm trying to get my iOS app to work on Apple silicon Macs, but ODR (On-Demand Resources) don't seem to work. It seems like the Xcode doesn't even acknowledge existence of ODR in the project when run as an iOS app for Mac on my M1 MacBook Air. I've created a very simple Xcode project to verify the issue, which only has a single image tagged as ODR. Checking the Disk tab in the Debug navigator, the ODR is shown correctly when running on a simulator: ...Yet when run as an iOS app for Mac it simply shows No Resources: The beginAccessingResources(...) call predictably fails, too, with the following error: Error: Error Domain=AssetErrorDomain Code=7 "Invalid status code `404`" UserInfo={NSDebugDescription=Invalid status code `404`, NSUnderlyingError=0x600003fd5fb0 {Error Domain=AssetErrorDomain Code=1404 "(null)"}} There are other messages in the console that could be related to the issue. The first thing the app logs when run as an iOS app for Mac, is this message repeated several times: 2022-01-20 12:14:41.566305+0000 ODRTest[29926:333135] [default] could not create original path for node <FSNode 0x600003191ca0> { isDir = ?, path = '/private/var/folders/kw/g_lttmtn0yx747mvzjmbksbc0000gn/X/FE0DB2BA-8F2D-5783-9BE1-891F8E117EC9/d/Wrapper/ODRTest.app' }, proceeding: Error Domain=NSPOSIXErrorDomain Code=1 "Operation not permitted" ODRTest is the name of the Xcode project I use to reproduce the issue. Nothing else is logged apart from these repeated messages and the ODR request error. The documentation here seems to explicitly suggest that ODR should work fine, so I'm guessing this is some odd configuration error on my machine — perhaps related to file system access? I've tried updating macOS and re-installing Xcode to latest from scratch to no avail. Anything else I'm missing here?
Replies
4
Boosts
0
Views
2.5k
Activity
Jun ’23
Mac Catalyst Required Device Capabilities
Hello, I have my largely iOS app running using Mac Catalyst, but I need to limit what Macs will be able to install it from the Mac App Store based on the GPU Family like MTLGPUFamily.mac2. Is that possible? Or I could limit it to Apple Silicon using the Designed for iPad target, but I would prefer to use Mac Catalyst instead of Designed for iPad. Is it possible to limit Mac Catalyst installs to Apple Silicon Macs? Side question: what capabilities are supported by MTLGPUFamily.mac2? I can't find it. My main interest is in CoreML inference acceleration. Thank you.
Replies
0
Boosts
0
Views
1.1k
Activity
Jun ’23
Xcode - Build for generic iOS Simulator
Hi, I'm trying to build my project for a simulator using Xcode. Since my Mac has an M1 chip, when I choose a simulator as the destination, the application is only built for the arm64 architecture. How can I build for the generic/platform='iOS Simulator' as I do with the command "xcodebuild ... -destination generic/platform='iOS Simulator'"?
Replies
2
Boosts
0
Views
1.2k
Activity
May ’23
aarch64 intrinsics
Many useful ARM intrinsics (such as fma, rng, ld64b, etc.) are described in Arm C Language Extensions. But the arm_acle.h header file shipped with Xcode not include them. Are these intrinsics supported by Apple Silicon chip?
Replies
1
Boosts
0
Views
2.1k
Activity
May ’23
Building XCFramework and (consuming) app in same workspace
I'd like to build an XCFramework and the consuming app in a single workspace to make sure the latest version of the framework is bundled with the app. So both projects - framework and app - are bundled in a common workspace in Xcode; just as we are used to with regular frameworks. In the framework's project I'm creating the XCFramework as per Apple's instruction as a script-only target using xcodebuild -create-xcframework to bundle the individual framework binaries. Now I'd like to include the generated .xcframework in the app project. However, Xcode doesn’t seem to understand that the framework project target creating the XCFramework is actually creating output: I’ve added the XCFramework target as a dependency in the consuming project, it builds when the main project is built, but there’s no output to be selected in the Link with Libraries or Copy Frameworks steps of the app project Directly adding the framework via Finder as a folder from either Debug/Release folder doesn't make sense, which one would you pick? This is a trivial step for regular frameworks but apparently I'm overlooking something when dealing with the .xcframework. How to proceed? Thanks, Jay
Replies
0
Boosts
0
Views
1.2k
Activity
May ’23
M1 Xcode 12.5 can't paste clipboard
I can't paste anything into my simulator since switching to an M1 MacMini. I've tried ticking and unticking "automatically sync clipboard". I've also tried using the "send clipboard" option manually, but no success. I can seem to paste into safari on the simulator, but not any app I create in Xcode. I've tried multiple and even creating a new one fresh. I get the below snippet in the console complaining its unable to access some file. Looks like its an Xcode / M1 bug. I'm not running via rosetta. Does anyone know how to fix this, its become a real blocker for me testing my app 2021-06-11 12:00:28.656521+0100 camlKit-Example[3736:123707] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x15dde658 ed2a1267 ab2496d7 34f186ad ... ec431c65 02d68f35 }, _LSLine=409, WrongSimulatorHash={length = 32, bytes = 0xaf25dda9 e45baa35 610eaabd 5bc09901 ... 9cbe61f3 81d7b9d9 }} 2021-06-11 12:00:28.656878+0100 camlKit-Example[3736:123707] [db] _LSSchemaConfigureForStore failed with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x15dde658 ed2a1267 ab2496d7 34f186ad ... ec431c65 02d68f35 }, _LSLine=409, WrongSimulatorHash={length = 32, bytes = 0xaf25dda9 e45baa35 610eaabd 5bc09901 ... 9cbe61f3 81d7b9d9 }} 2021-06-11 12:00:28.656957+0100 camlKit-Example[3736:123707] [db] Failed to initialize client context with error Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)" UserInfo={_LSFunction=_LSSchemaConfigureForStore, ExpectedSimulatorHash={length = 32, bytes = 0x15dde658 ed2a1267 ab2496d7 34f186ad ... ec431c65 02d68f35 }, _LSLine=409, WrongSimulatorHash={length = 32, bytes = 0xaf25dda9 e45baa35 610eaabd 5bc09901 ... 9cbe61f3 81d7b9d9 }} 2021-06-11 12:00:28.657397+0100 camlKit-Example[3736:123707] [claims] Upload preparation for claim 1B09A1C9-1B93-4AB0-B91D-F8789C91AB3C completed with error: Error Domain=NSCocoaErrorDomain Code=256 "The file “fb19cda6511c09d17006da7aefa63f10ea73f68b” couldn’t be opened." UserInfo={NSURL=file:///Users/simonmcloughlin/Library/Developer/CoreSimulator/Devices/CD0E07DE-8C9C-4466-978B-1F6E635EE0E2/data/Library/Caches/com.apple.Pasteboard/eb77e5f8f043896faf63b5041f0fbd121db984dd/fb19cda6511c09d17006da7aefa63f10ea73f68b, NSFilePath=/Users/simonmcloughlin/Library/Developer/CoreSimulator/Devices/CD0E07DE-8C9C-4466-978B-1F6E635EE0E2/data/Library/Caches/com.apple.Pasteboard/eb77e5f8f043896faf63b5041f0fbd121db984dd/fb19cda6511c09d17006da7aefa63f10ea73f68b, NSUnderlyingError=0x600002813ae0 {Error Domain=NSOSStatusErrorDomain Code=-10817 "(null)"}}
Replies
58
Boosts
10
Views
36k
Activity
Apr ’23
Failed to build module, Apple Swift version 5.1.3 have features that aren't supported by this compiler, 'Apple Swift version 5.3.2
Get error in XCode 12.4 on my new Macbook Air M1: unable to load standard library for target 'arm64-apple-ios8.0' failed to build module 'SciChart' from its module interface; the compiler that produced it, 'Apple Swift version 5.1.3 (swiftlang-1100.0.282.1 clang-1100.0.33.15)', may have used features that aren't supported by this compiler, 'Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28)' On my old Macbook Pro 2016, with intel chip I don't have any troubles. Both my Macbook have the same XCode version 12.4 and the same Swift version: Apple Swift version 5.3.2 (swiftlang-1200.0.45 clang-1200.0.32.28) Target: x86_64-apple-darwin20.3.0 What I already done: Reinstall XCode; Changed Swift Language Version; Deleted VALID_ARCHS reference according Xcode 12 Beta 2 - unable to load standard library for target 'arm64-apple-ios14.0-simulator'. And nothing works to me. Please can you help me! How to solve it?
Replies
11
Boosts
0
Views
19k
Activity
Apr ’23
Failed assertion `destination datatype must be fp32' when using PyTorch with Metal Performance Shaders on A14 devices
Hello Apple Developer Community, I'm experiencing an issue when using PyTorch in combination with Metal Performance Shaders (MPS) on an A14 device. During the execution of the backward() function, I encounter the following error message: /AppleInternal/Library/BuildRoots/9941690d-bcf7-11ed-a645-863efbbaf80d/Library/Caches/com.apple.xbs/Sources/MetalPerformanceShaders/MPSNDArray/Kernels/MPSNDArrayConvolutionA14.mm:4332: failed assertion `destination datatype must be fp32' I have already verified that both the input tensors and gradient tensors are of float32 datatype before the backward() function is called. However, the error seems to be originating from the MPS code, specifically within the MPSNDArrayConvolutionA14.mm file. Could you provide any guidance or recommendations on how to resolve this issue? Is there any specific constraint or requirement that I should be aware of when using MPS with PyTorch on A14 devices? I would greatly appreciate any help or suggestions. Thank you in advance for your support. Best regards, kiyotaka86
Replies
1
Boosts
1
Views
1.5k
Activity
Apr ’23
SwiftUI UITableView NSInternalInconsistencyException in M1 simulator
Hello, I have a weird bug that happens only on my M1 Mac mini when buiding for the simulator. It is the typical table view NSInternalInconsistencyException error: ** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'attempt to insert row 2 into section 0, but there are only 2 rows in section 0 after the update' The error is related to a table view instantiated and managed by SwiftUI so I have no control over datasources. The corresponding View has a list fed a fetched result, with this property: var recipes: FetchedResultsRecipe { fetchRequest.wrappedValue } The crash happens the I add an object to the NSManagedObjectContext that stores the app contents. It happens when performing a very simple and fundamental flow of my app (a recipes app: the action is "add a recipe", imagine that). I found the crash yesterday after moving the project to my new M1 Mac. I verified that there is no crash or warning on the device iPhone XR) or on my older 2018 MacBook Pro. Anyone with a suggestion, or similar bugs? Thanks, Davide
Replies
4
Boosts
0
Views
3.7k
Activity
Apr ’23
target_os_mac is not working
Since we used ActivityKit which is iOS16 ability, it works good on iphone. But not good for apple silicon mac, which will crash because of the activitykit could not be founded.So we try to use #if TARGET_OS_IPHONE import ActivityKit #endif to avoid the crash. And it's not working as expect. We tried #if canImport(ActivityKit) , it's not working either.
Replies
1
Boosts
0
Views
1.2k
Activity
Apr ’23
Tensorflow on M1 mac using pyenv and poetry instead of conda
Is it possible to get tensorflow to work on an M1 (pro) using peotry and pyenv instead of conda? The official instructions are all for Conda.
Replies
2
Boosts
0
Views
1.4k
Activity
Apr ’23
Why "Open using Rosetta" is still needed to run on Simulator?
Hi, We ported our app to Apple Silicon and we often need to run our apps on simulator. But to be able to run on Simulator, I need to enable "Open using Rosetta". Also, under Build Settings → Architectures → Excluded Architectures, I have arm64. So, with out the need of enabling Open using Rosetta, how wold I be able to run the app on simulator and other platforms - iOS, iPadOS and macOS? Thank you!
Replies
5
Boosts
0
Views
8.4k
Activity
Apr ’23
Any option to profile JIT code with Instruments?
Hi, I would like to use the Instruments Time Profiler to profile code of an emulator project. The code is generated by a JIT compiler at runtime. Unfortunately, Instruments only displays an address and it cannot even display the disassembly of that dynamically generated code region. The solution for x86_64 is to use VTune on Windows, the VTune JIT Profiling API allows to specify code regions and give them a name (and even specify source code). Is there something like that for Instruments, too? Or any other alternatives to profile JIT code on Apple Silicon? Thanks a lot in advance! Lyve
Replies
2
Boosts
0
Views
866
Activity
Apr ’23
Possible Pointer Authentication Failure on iOS
We are seeing crashes lately that seem to be caused by PAC, but we are not yet building for the arm64e architecture as advertised here. Is it likely that adopting that architecture will alleviate these crashes?
Replies
1
Boosts
0
Views
1.4k
Activity
Apr ’23
How to Show current GPU usage via METAL®
on macOS silicon where memory is unified its now important to see how much memory is being used by the GPU, but unlike OpenGL which has been depreciated for some time, metal doesnt seem to have any "Driver Monitor Parameters" to be able to display this information. Example of OpenGL Parameters: https://developer.apple.com/library/archive/documentation/GraphicsImaging/Conceptual/OpenGLDriverMonitorUserGuide/Glossary/Glossary.html Im looking for an equivalent for METAL® but haven't been able to find any, unless im overlooking everything in how metal is laid out idk. any ideas or sense of direction would be ideal. thanks for anyone who can help.
Replies
0
Boosts
0
Views
932
Activity
Apr ’23
Can no longer unit test iOS apps on Mac in Xcode 14.3
I have been using unit tests for iOS apps running on a mac (Designed For iPad destination). The reason is that I need to be able to test Metal code on an Apple Silicon GPU and I can't do that using the Simulator since it's treated as a different GPU. Since upgrading to Xcode 14.3 that no longer seems possible: It's telling me Unable to initialize test bundle from file .... The console seems to suggest it's a Sandbox violation. Can anyone from Apple confirm that this is intended? Are there any other ways to unit test iOS code on an Apple Silicon GPU?
Replies
1
Boosts
0
Views
945
Activity
Mar ’23
Is Xcode 14.3 Apple Silicon Only - It won't start on my Intel anymore
Is Xcode 14.3 going to be a Universal build or just Apple Silicon? 96 Hangs.
Replies
3
Boosts
0
Views
2.2k
Activity
Mar ’23
Incoming VoIP call MacOS 13.0+ (designed for iPad)
I creating application for VoIP calls on iOS all is working well, but after I try to migrate this app into MacOS I have some troubles with incoming calls, I don't receive call notification. Using CallKit which support MacOS from 13 version my current MacOS version is 13.1 (22C65) Device MacBook Air M2 2022 MacOS 13.1 (22C65) Xcode 14.2 (14C18)
Replies
1
Boosts
1
Views
968
Activity
Mar ’23
CPU Limiter on Instrument missing for xcode 14.2 on M1 mac mini
Hello, I have 2 problems currently tied to instruments on xcode 14.2 The first one: i currently use macbook pro 13' with intel processor and a mac mini M1. i am doing some signpost logging to measure my app performance on certain app lifetime period. The logging code is currently working in Macbook pro with intell processor, showing time spans of the intended signpost record. But with the same code, i cannot see result when i run it on Mac mini M1. The second one: Is about the instument settings. In intel macbook, the instument settings have CPU tab where i can limit my CPU core used for instrumentation. But on mac mini M1, i don't see any CPU tab on instrument setting, is this expected? ---will edit later--- img: Intel result img: mac mini M1 result ---will edit later--- img: Intel instument settings img: M1 Instrument settings
Replies
1
Boosts
0
Views
1.2k
Activity
Mar ’23