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

What is `fma.shff`?
I'm trying to optimize code for the M1 GPU family (Apple 7 variants where F32 compute power equals F16 compute power). xcrun metal-opt mentions a compile option called -fma-shff-hoist-depth-agx2=<uint>. There's something called fma.shff. I'd like to know what the "SHFF" acronym stands for. Shuffle? Shift? Perhaps it's related to SIMD-group reductions.
0
0
987
Dec ’22
Hortonworks Sandbox HDP run issue in Mac M2
"vmSummary" : "ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)\nWritable regions: Total=11.7G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=11.7G(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nAccelerate framework 896K 7 \nActivity Tracing 256K 1 \nCG backing stores 3328K 4 \nCG image 128K 6 \nCG raster data 176K 3 \nColorSync 608K 27 \nCoreAnimation 656K 24 \nCoreGraphics 32K 2 \nCoreImage 48K 1 \nCoreUI image data 2128K 13 \nFoundation 16K 1 \nKernel Alloc Once 32K 1 \nMALLOC 10.4G 171 \nMALLOC guard page 192K 9 \nMALLOC_MEDIUM (reserved) 904.0M 8 reserved VM address space (unallocated)\nMALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)\nSTACK GUARD 56.6M 38 \nStack 27.6M 38 \nVM_ALLOCATE 6752K 26 \n__AUTH 681K 175 \n__AUTH_CONST 12.2M 338 \n__CTF 756 1 \n__DATA 10.3M 363 \n__DATA_CONST 17.8M 374 \n__DATA_DIRTY 793K 114 \n__FONT_DATA 2352 1 \n__LINKEDIT 774.5M 36 \n__OBJC_CONST 1539K 148 \n__OBJC_RO 65.1M 1 \n__OBJC_RW 1981K 1 \n__TEXT 318.2M 389 \ndyld private memory 256K 1 \nmapped file 185.6M 34 \nshared memory 944K 18 \n=========== ======= ======= \nTOTAL 13.1G 2375 \nTOTAL, minus reserved VM space 11.9G 2375 \n", "legacyInfo" : { "threadTriggered" : { "name" : "EMT-2" } }, "trialInfo" : { "rollouts" : [ { "rolloutId" : "610d52e1fc54bc3389840408", "factorPackIds" : { "SIRI_UNDERSTANDING_ASR_ASSISTANT" : "6348ad0234d9d80ede80aabb", "SIRI_UNDERSTANDING_MORPHUN" : "62ec7220c682040ba94e6a20" }, "deploymentId" : 240000507 } ], "experiments" : [ ] } } Model: Mac14,2, BootROM 8419.41.10, proc 8:4:4 processors, 16 GB, SMC Graphics: Apple M2, Apple M2, Built-In Display: Color LCD, spdisplays_2560x1664Retina, Main, MirrorOff, Online Memory Module: LPDDR5, Hynix AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4387), wl0: Sep 3 2022 02:35:52 version 20.10.965.9.8.7.129 FWID 01-b0e84a9b Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB31Bus USB Device: USB31Bus Thunderbolt Bus: MacBook Air, Apple Inc. Thunderbolt Bus: MacBook Air, Apple Inc.
1
0
1.3k
Dec ’22
UI Tests on "My Mac (Designed for iPad)" - Apple Silicon
Due to some of what we do with the Metal API in our iOS app, we are unable use Simulator for development / testing purposes. With the introduction of Apple Silicon, we are able to run/build to the "My Mac (Designed for iPad)" destination for our app. However, when we try running UI tests with that destination we get the message "Cannot test target <ui_test_target> on "My Mac": UI tests are not supported ..." Wondering if there's a way to run UI tests against the "My Mac (Designed for iPad)" destination?
1
1
1.8k
Nov ’22
Locked mouse pointer and in-app purchases
We have an iOS app in Development with in-app purchases that works fine on iOS devices. When running the app on Apple Silicon Macs, the app locks the mouse pointer and renders its own (via GCMouse listener events). When the user selects an in-app item to purchase, the operating system displays the purchase confirmation dialog as expected, however because the pointer is still locked, users are unable to click elements on the dialog or see a pointer. I've tried running setNeedsUpdateOfPrefersPointerLocked and returning false prior to the purchase but the pointer remains locked. Is there a better way to immediately release the lock or ensure the in-app purchase dialog gets the mouse pointer? Thanks.
1
0
2.1k
Nov ’22
Mac (designed for iPad) builds locally an M1 app but does not archive as M1 app
I am lost! I have a nice little iOS app for iPad and iPhone and thought, oh, let's pick that low-hanging fruit of making this iOS app available for M1 macOS devices (only) with virtually no effort according to this instruction: https://developer.apple.com/documentation/uikit/mac_catalyst/creating_a_mac_version_of_your_ipad_app That description is a bit dated, but it seems that when I add the target 'Mac (designed for iPad)', I get what I want: "Run your unmodified iOS app on Mac Computer with M1 chip" it says in the byline in Xcode. That is exactly what I want. Perfect! And indeed, I can switch to "My Mac (designed for iPad)" target, build everything, and get a standalone Mac application on my Mac that is NOT in the Simulator. It is my iOS app, but now as Mac app, and it seems to work. Perfect! But, hmm, double checking - I do not see the sandboxing field in signing (yet I do see the app is sandboxed when checking in Activity Monitor). And when I try to upload to AppStore, I seem to upload the iOS variant, regardless of what I am trying. Nothing ever arrives at the store that would show up as a build for the macOS variant of my app. I need to add as target Mac (so without the designed for iPad), to get the sandbox input fields become visible. I then can also create a Mac Archive. But alas, it does not build then... LaunchScreen.storyboard error build: iOS storyboards do not support target device type "mac". So, what do I need to do to get this simple, low-hanging fruit of "My Mac (designed for iPad)" , where the sandboxing input fields are shown, the whole thing archives for macOS, and it all still works without having to touch the code at all. Or it archives as iOS, but I can pick up the archive submitted to AppStore in the macOS section of my App. I do not mind which way, as long as I get the low-hanging fruit promised to me in the byline by Xcode. Thanks a bunch, Mathias Xcode 14.0.1
2
0
6.5k
Nov ’22
Cannot import tensorflow in Python3 in MacOS 12.6.1 on M1 Mac
I'm trying to use tensorflow per this tutorial for arm64 Apple Silicon: https://developer.apple.com/metal/tensorflow-plugin/ However, when I attempt to import tensorflow, I get this error: RuntimeError Traceback (most recent call last) RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf Output exceeds the size limit. Open the full output data in a text editor ImportError Traceback (most recent call last) ImportError: numpy.core.multiarray failed to import The above exception was the direct cause of the following exception: SystemError Traceback (most recent call last) SystemError: <built-in method contains of dict object at 0x107c68040> returned a result with an error set The above exception was the direct cause of the following exception: ImportError Traceback (most recent call last) Cell In [2], line 1 ----> 1 import tensorflow as tf File ~/opt/miniconda3/envs/speaker_recognition/lib/python3.8/site-packages/tensorflow/init.py:37 34 import sys as _sys 35 import typing as _typing ---> 37 from tensorflow.python.tools import module_util as _module_util 38 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader 40 # Make sure code inside the TensorFlow codebase can use tf2.enabled() at import. File ~/opt/miniconda3/envs/speaker_recognition/lib/python3.8/site-packages/tensorflow/python/init.py:37 29 # We aim to keep this file minimal and ideally remove completely. 30 # If you are adding a new file with @tf_export decorators, ... ---> 19 from tensorflow.python.client._pywrap_tf_session import * 20 from tensorflow.python.client._pywrap_tf_session import _TF_SetTarget 21 from tensorflow.python.client._pywrap_tf_session import _TF_SetConfig ImportError: initialization failed What else can I try to get tensorflow operational and using my M1's GPU?
2
3
2.7k
Nov ’22
Why Python native on M1 Max is greatly slower than Python on old Intel i5?
I just got my new MacBook Pro with M1 Max chip and am setting up Python. I've tried several combinational settings to test speed - now I'm quite confused. First put my questions here: Why python run natively on M1 Max is greatly (~100%) slower than on my old MacBook Pro 2016 with Intel i5? On M1 Max, why there isn't significant speed difference between native run (by miniforge) and run via Rosetta (by anaconda) - which is supposed to be slower ~20%? On M1 Max and native run, why there isn't significant speed difference between conda installed Numpy and TensorFlow installed Numpy - which is supposed to be faster? On M1 Max, why run in PyCharm IDE is constantly slower ~20% than run from terminal, which doesn't happen on my old Intel Mac. Evidence supporting my questions is as follows: Here are the settings I've tried: 1. Python installed by Miniforge-arm64, so that python is natively run on M1 Max Chip. (Check from Activity Monitor, Kind of python process is Apple). Anaconda.: Then python is run via Rosseta. (Check from Activity Monitor, Kind of python process is Intel). 2. Numpy installed by conda install numpy: numpy from original conda-forge channel, or pre-installed with anaconda. Apple-TensorFlow: with python installed by miniforge, I directly install tensorflow, and numpy will also be installed. It's said that, numpy installed in this way is optimized for Apple M1 and will be faster. Here is the installation commands: conda install -c apple tensorflow-deps python -m pip install tensorflow-macos python -m pip install tensorflow-metal 3. Run from Terminal. PyCharm (Apple Silicon version). Here is the test code: import time import numpy as np np.random.seed(42) a = np.random.uniform(size=(300, 300)) runtimes = 10 timecosts = [] for _ in range(runtimes): s_time = time.time() for i in range(100): a += 1 np.linalg.svd(a) timecosts.append(time.time() - s_time) print(f'mean of {runtimes} runs: {np.mean(timecosts):.5f}s') and here are the results: +-----------------------------------+-----------------------+--------------------+ | Python installed by (run on)→ | Miniforge (native M1) | Anaconda (Rosseta) | +----------------------+------------+------------+----------+----------+---------+ | Numpy installed by ↓ | Run from → | Terminal | PyCharm | Terminal | PyCharm | +----------------------+------------+------------+----------+----------+---------+ | Apple Tensorflow | 4.19151 | 4.86248 | / | / | +-----------------------------------+------------+----------+----------+---------+ | conda install numpy | 4.29386 | 4.98370 | 4.10029 | 4.99271 | +-----------------------------------+------------+----------+----------+---------+ This is quite slow. For comparison, run the same code on my old MacBook Pro 2016 with i5 chip - it costs 2.39917s. another post reports that run with M1 chip (not Pro or Max), miniforge+conda_installed_numpy is 2.53214s, and miniforge+apple_tensorflow_numpy is 1.00613s. you may also try on it your own. Here is the CPU information details: My old i5: $ sysctl -a | grep -e brand_string -e cpu.core_count machdep.cpu.brand_string: Intel(R) Core(TM) i5-6360U CPU @ 2.00GHz machdep.cpu.core_count: 2 My new M1 Max: % sysctl -a | grep -e brand_string -e cpu.core_count machdep.cpu.brand_string: Apple M1 Max machdep.cpu.core_count: 10 I follow instructions strictly from tutorials - but why would all these happen? Is it because of my installation flaws, or because of M1 Max chip? Since my work relies heavily on local runs, local speed is very important to me. Any suggestions to possible solution, or any data points on your own device would be greatly appreciated :)
11
1
33k
Nov ’22
Failed task "pod install" on M1 Chip
Hello! I am trying to install pods for a react native app , but I can't install the pods with the M1 Chip. I tried several times with different approaches like the following: sudo arch -x86_64 gem install ffi arch -x86_64 pod install or installing via rosetta terminal or installing with homebrew or switching to another ruby version (ruby-2.7.5) with rvm use but "pod install" always fails with the following error message: `incompatible library version - /Users/user/.rvm/gems/ruby-3.0.0/gems/ffi-1.15.5/lib/ffi_c.bundle´ it seems like the current ruby version is not compatible with the ffi and the cocoapods version. Can anyone help me or have another idea why it does not work? I think another problem could be that it uses different ruby versions within the process of installation because I have ruby installed with homebrew and on another location too.
1
0
1.7k
Nov ’22
Cannot unset schg on M1 Mac
Hi. I am using a Mac mini with M1. I created a symlink on the Desktop folder and set schg flag so that the system would not modify the link. Now I want to revert Desktop back to a normal folder, but the flag cannot be removed with this command: sudo chflags schg [path] Normally, booting in Single User Mode is advised for removing this specific flag since the system cannot alter anything when schg flag is set. But there is no longer Single User Mode in M1 Macs. I tried removing the flag in Recovery mode with the same command but it didn't help. What is the correct way to unset schg flag in M1 Macs? Thanks
3
0
4.1k
Nov ’22
Not Able to Build Some Versions of Python on M1 at 12.3.1
I trying to build older version of python such as 3.6, 3.7, 3.8 using pyenv and having build failures. I am on apple silicon and the last macOS 12.3.1. In older OS these versions would build fine. Following is the failure I get running pyenv install 3.6.9 python-build: use openssl@1.1 from homebrew python-build: use readline from homebrew Downloading Python-3.6.9.tar.xz... -> https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tar.xz Installing Python-3.6.9... python-build: use readline from homebrew python-build: use zlib from xcode sdk BUILD FAILED (OS X 12.3.1 using python-build 20180424) Inspect or clean up the working tree at /var/folders/sn/46fncn513kng4ssgwn398m5h0000gn/T/python-build.20220403110510.8666 Results logged to /var/folders/sn/46fncn513kng4ssgwn398m5h0000gn/T/python-build.20220403110510.8666.log Last 10 log lines: checking for --with-cxx-main=<compiler>... no checking for clang++... no configure:   By default, distutils will build C++ extension modules with "clang++".   If this is not intended, then set CXX on the configure command line.    checking for the platform triplet based on compiler characteristics... darwin configure: error: internal configure error for the platform triplet, please file a bug report make: *** No targets specified and no makefile found.  Stop.
3
1
12k
Nov ’22
TWO errors at the same time when running UITests on a simulator on a M1 Max MacBook
I get two error windows at the same time when I try to run UITests using a simulator in the newest XCode Version 14.1 (14B47b): Could not attach to PID Problem report Could not attach to pid : “3297” Domain: IDEDebugSessionErrorDomain Code: 3 Failure Reason: tried to attach to process already being debugged User Info: {   DVTErrorCreationDateKey = "2022-11-03 00:53:03 +0000";   DVTRadarComponentKey = 855031;   IDERunOperationFailingWorker = DBGLLDBLauncher;   RawUnderlyingErrorMessage = "tried to attach to process already being debugged"; } -- Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {   "device_model" = "iPhone15,2";   "device_osBuild" = "16.1 (20B72)";   "device_platform" = "com.apple.platform.iphonesimulator";   "launchSession_schemeCommand" = Test;   "launchSession_state" = 1;   "launchSession_targetArch" = "x86_64";   "operation_duration_ms" = 37573;   "operation_errorCode" = 3;   "operation_errorDomain" = IDEDebugSessionErrorDomain;   "operation_errorWorker" = DBGLLDBLauncher;   "operation_name" = IDERunOperationWorkerGroup;   "param_consoleMode" = 0;   "param_debugger_attachToExtensions" = 0;   "param_debugger_attachToXPC" = 1;   "param_debugger_type" = 3;   "param_destination_isProxy" = 0;   "param_destination_platform" = "com.apple.platform.iphonesimulator";   "param_diag_MainThreadChecker_stopOnIssue" = 0;   "param_diag_MallocStackLogging_enableDuringAttach" = 0;   "param_diag_MallocStackLogging_enableForXPC" = 0;   "param_diag_allowLocationSimulation" = 1;   "param_diag_checker_tpc_enable" = 0;   "param_diag_gpu_frameCapture_enable" = 3;   "param_diag_gpu_shaderValidation_enable" = 0;   "param_diag_gpu_validation_enable" = 1;   "param_diag_memoryGraphOnResourceException" = 0;   "param_diag_queueDebugging_enable" = 1;   "param_diag_runtimeProfile_generate" = 0;   "param_diag_sanitizer_asan_enable" = 0;   "param_diag_sanitizer_tsan_enable" = 0;   "param_diag_sanitizer_tsan_stopOnIssue" = 0;   "param_diag_sanitizer_ubsan_stopOnIssue" = 0;   "param_diag_showNonLocalizedStrings" = 0;   "param_diag_viewDebugging_enabled" = 1;   "param_diag_viewDebugging_insertDylibOnLaunch" = 0;   "param_install_style" = 2;   "param_launcher_UID" = 2;   "param_launcher_allowDeviceSensorReplayData" = 0;   "param_launcher_kind" = 0;   "param_launcher_style" = 0;   "param_launcher_substyle" = 64;   "param_runnable_appExtensionHostRunMode" = 0;   "param_runnable_productType" = "com.apple.product-type.application";   "param_runnable_type" = 1;   "param_testing_launchedForTesting" = 1;   "param_testing_suppressSimulatorApp" = 0;   "param_testing_usingCLI" = 0;   "sdk_canonicalName" = "iphonesimulator16.1";   "sdk_osVersion" = "16.1";   "sdk_variant" = iphonesimulator; } -- System Information macOS Version 13.0 (Build 22A380) Xcode 14.1 (21534.1) (Build 14B47b) Timestamp: 2022-11-02T20:53:03-04:00 . . . This has been happening consistently. When I proceed to try and "Device" ==> "erase all contents and settings" on the Simulator, I get another error "Simulator quit unexpectedly": Overal, my development experience on my M1 Max has been very miserable. I've been having major issues on two separate M1 Max machines with fresh OS installs. I would appreciate
3
0
2.1k
Nov ’22
iOS project giving build errors after upgrading macOS to Ventura 13.0 and xcode to 14.0.1
My macbook pro has M2 chip. I had macOS Monterey and xcode 13.4.1 in my system and my iOS project was building and running properly. Then I updated macOS to Ventura 13.0 and xcode to 14.0.1. At first, I got errors regarding bitcode. I set "Enable Bitcode" option to "no" in all targets, including pod targets. Now I'm getting many other errors. One error I noticed as something important is regarding bridging header. :0: error: failed to emit precompiled header '/Library/Developer/Xcode/DerivedData/project-aizvv/Build/Intermediates.noindex/PrecompiledHeaders/project-Bridging-Header-swift_37CYKUIBOA6M1-clang_3BJMUTP0IBSLM.pch' for bridging header '/myPath/project-Bridging-Header.h' Another error is from GoogleSignIn. GoogleSignIn was installed through cocoapod. And in xcode 14, it is asking to specify development team in signing section. could not build module 'GoogleSignIn' 1. while building module 'GoogleSignIn' imported from /myPath/project-Bridging-Header.h:6: There are many such errors from different pods. could not build module 'GTMSessionFetcher' redefinition of 'GTMSessionFetcherError' And on top of all the errors, error build: too many errors emitted, stopping now Why all these issues are coming after macOS and xcode update? Is there any way I can continue development without disabling bitcode?
3
0
2.1k
Nov ’22
UTType always return nil when testing on M1 Mac simulator with x86 arch
(environment: macOS 11.4, Xcode 12.4, iOS simulator 14.4) The below test does not passed when a project's architectures for "Any iOS Simulator SDK" contains X86_64 only. (Open a new project with architectures arm64 passes) import UniformTypeIdentifiers class UTTypeTests: XCTestCase {     func testThatItConvertsFromMIMEType() {         if #available(iOS 14.0, *) {             guard let mp4Type = UTType(mimeType: "video/mp4") else {                 return XCTFail("Could not decode from MIME type.")             }                          XCTAssertEqual(mp4Type, UTType.mpeg4Movie)         } else {         }   } } similar issue happens on deprecated method UTTypeCopyPreferredTagWithClass
4
0
3.4k
Oct ’22
Error when trying to use Tensorflow mixed-precision on M1 Pro
I tried training my model on my M1 Pro using Tensorflow's mixed-precision, hoping it will boost the performance, but I got an error: .../mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm:289:0: error: 'mps.select' op failed to verify that all of {true_value, false_value, result} have same element type .../mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm:289:0: note: see current operation: %5 = "mps.select"(%4, %3, %2) : (tensor<1xi1>, tensor<1xf16>, tensor<1xf32>) -> tensor<1xf16>
1
0
2.1k
Oct ’22
iOS app running on M1 has issues with UIImagePickerController AND PHPickerViewController
Hi, I have an established iOS app that runs great on iOS. Recently I have been working on the M1 version of the app, which is running from the iOS code. This is not a catalyst issue, it's an iOS app running on M1. Most of the app looks great and functions as expected. However, when I present a UIImagePickerController OR a PHPickerViewController, my test users are experiencing that they cannot click to select an image (images do appear, it's the "clicking" that does not seem to register), and also cannot click the "cancel" button - if they click on the very far left of the "Cancel" button, it does work. All other UIButtons etc work correctly throughout the rest of the app - it's only UIImagePickerController and PHPhotoPickerController that seem to have this issue. I am not experiencing this issue myself when I build the app from Xcode, nor do I see the issue when I run the binary that I have sent to my testers. What could the issue be here? There is obviously some difference between our machines (they do not have xcode installed, for instance), but we are running the same version of macOS Monterey (12.5.1).
4
1
1.3k
Oct ’22
What is `fma.shff`?
I'm trying to optimize code for the M1 GPU family (Apple 7 variants where F32 compute power equals F16 compute power). xcrun metal-opt mentions a compile option called -fma-shff-hoist-depth-agx2=<uint>. There's something called fma.shff. I'd like to know what the "SHFF" acronym stands for. Shuffle? Shift? Perhaps it's related to SIMD-group reductions.
Replies
0
Boosts
0
Views
987
Activity
Dec ’22
After enable testing iPhone apps in Mac in TestFlight some version still can't be downloaded
After enable testing iPhone apps in Mac in TestFlight some version still shows "iOS Device Only" Older versions can be downloaded in MacOS. Anyone know why?
Replies
0
Boosts
0
Views
782
Activity
Dec ’22
Hortonworks Sandbox HDP run issue in Mac M2
"vmSummary" : "ReadOnly portion of Libraries: Total=1.1G resident=0K(0%) swapped_out_or_unallocated=1.1G(100%)\nWritable regions: Total=11.7G written=0K(0%) resident=0K(0%) swapped_out=0K(0%) unallocated=11.7G(100%)\n\n VIRTUAL REGION \nREGION TYPE SIZE COUNT (non-coalesced) \n=========== ======= ======= \nAccelerate framework 896K 7 \nActivity Tracing 256K 1 \nCG backing stores 3328K 4 \nCG image 128K 6 \nCG raster data 176K 3 \nColorSync 608K 27 \nCoreAnimation 656K 24 \nCoreGraphics 32K 2 \nCoreImage 48K 1 \nCoreUI image data 2128K 13 \nFoundation 16K 1 \nKernel Alloc Once 32K 1 \nMALLOC 10.4G 171 \nMALLOC guard page 192K 9 \nMALLOC_MEDIUM (reserved) 904.0M 8 reserved VM address space (unallocated)\nMALLOC_NANO (reserved) 384.0M 1 reserved VM address space (unallocated)\nSTACK GUARD 56.6M 38 \nStack 27.6M 38 \nVM_ALLOCATE 6752K 26 \n__AUTH 681K 175 \n__AUTH_CONST 12.2M 338 \n__CTF 756 1 \n__DATA 10.3M 363 \n__DATA_CONST 17.8M 374 \n__DATA_DIRTY 793K 114 \n__FONT_DATA 2352 1 \n__LINKEDIT 774.5M 36 \n__OBJC_CONST 1539K 148 \n__OBJC_RO 65.1M 1 \n__OBJC_RW 1981K 1 \n__TEXT 318.2M 389 \ndyld private memory 256K 1 \nmapped file 185.6M 34 \nshared memory 944K 18 \n=========== ======= ======= \nTOTAL 13.1G 2375 \nTOTAL, minus reserved VM space 11.9G 2375 \n", "legacyInfo" : { "threadTriggered" : { "name" : "EMT-2" } }, "trialInfo" : { "rollouts" : [ { "rolloutId" : "610d52e1fc54bc3389840408", "factorPackIds" : { "SIRI_UNDERSTANDING_ASR_ASSISTANT" : "6348ad0234d9d80ede80aabb", "SIRI_UNDERSTANDING_MORPHUN" : "62ec7220c682040ba94e6a20" }, "deploymentId" : 240000507 } ], "experiments" : [ ] } } Model: Mac14,2, BootROM 8419.41.10, proc 8:4:4 processors, 16 GB, SMC Graphics: Apple M2, Apple M2, Built-In Display: Color LCD, spdisplays_2560x1664Retina, Main, MirrorOff, Online Memory Module: LPDDR5, Hynix AirPort: spairport_wireless_card_type_wifi (0x14E4, 0x4387), wl0: Sep 3 2022 02:35:52 version 20.10.965.9.8.7.129 FWID 01-b0e84a9b Bluetooth: Version (null), 0 services, 0 devices, 0 incoming serial ports Network Service: Wi-Fi, AirPort, en0 USB Device: USB31Bus USB Device: USB31Bus Thunderbolt Bus: MacBook Air, Apple Inc. Thunderbolt Bus: MacBook Air, Apple Inc.
Replies
1
Boosts
0
Views
1.3k
Activity
Dec ’22
UI Tests on "My Mac (Designed for iPad)" - Apple Silicon
Due to some of what we do with the Metal API in our iOS app, we are unable use Simulator for development / testing purposes. With the introduction of Apple Silicon, we are able to run/build to the "My Mac (Designed for iPad)" destination for our app. However, when we try running UI tests with that destination we get the message "Cannot test target <ui_test_target> on "My Mac": UI tests are not supported ..." Wondering if there's a way to run UI tests against the "My Mac (Designed for iPad)" destination?
Replies
1
Boosts
1
Views
1.8k
Activity
Nov ’22
Macbook Air 2020
Hello, I want to know about M1, what is the action for players, the jamming problem, whether apple mostery or ventura, I want to know when the fixes are for players without arm64 only for amd64 for high
Replies
1
Boosts
0
Views
678
Activity
Nov ’22
Locked mouse pointer and in-app purchases
We have an iOS app in Development with in-app purchases that works fine on iOS devices. When running the app on Apple Silicon Macs, the app locks the mouse pointer and renders its own (via GCMouse listener events). When the user selects an in-app item to purchase, the operating system displays the purchase confirmation dialog as expected, however because the pointer is still locked, users are unable to click elements on the dialog or see a pointer. I've tried running setNeedsUpdateOfPrefersPointerLocked and returning false prior to the purchase but the pointer remains locked. Is there a better way to immediately release the lock or ensure the in-app purchase dialog gets the mouse pointer? Thanks.
Replies
1
Boosts
0
Views
2.1k
Activity
Nov ’22
Mac (designed for iPad) builds locally an M1 app but does not archive as M1 app
I am lost! I have a nice little iOS app for iPad and iPhone and thought, oh, let's pick that low-hanging fruit of making this iOS app available for M1 macOS devices (only) with virtually no effort according to this instruction: https://developer.apple.com/documentation/uikit/mac_catalyst/creating_a_mac_version_of_your_ipad_app That description is a bit dated, but it seems that when I add the target 'Mac (designed for iPad)', I get what I want: "Run your unmodified iOS app on Mac Computer with M1 chip" it says in the byline in Xcode. That is exactly what I want. Perfect! And indeed, I can switch to "My Mac (designed for iPad)" target, build everything, and get a standalone Mac application on my Mac that is NOT in the Simulator. It is my iOS app, but now as Mac app, and it seems to work. Perfect! But, hmm, double checking - I do not see the sandboxing field in signing (yet I do see the app is sandboxed when checking in Activity Monitor). And when I try to upload to AppStore, I seem to upload the iOS variant, regardless of what I am trying. Nothing ever arrives at the store that would show up as a build for the macOS variant of my app. I need to add as target Mac (so without the designed for iPad), to get the sandbox input fields become visible. I then can also create a Mac Archive. But alas, it does not build then... LaunchScreen.storyboard error build: iOS storyboards do not support target device type "mac". So, what do I need to do to get this simple, low-hanging fruit of "My Mac (designed for iPad)" , where the sandboxing input fields are shown, the whole thing archives for macOS, and it all still works without having to touch the code at all. Or it archives as iOS, but I can pick up the archive submitted to AppStore in the macOS section of my App. I do not mind which way, as long as I get the low-hanging fruit promised to me in the byline by Xcode. Thanks a bunch, Mathias Xcode 14.0.1
Replies
2
Boosts
0
Views
6.5k
Activity
Nov ’22
Cannot import tensorflow in Python3 in MacOS 12.6.1 on M1 Mac
I'm trying to use tensorflow per this tutorial for arm64 Apple Silicon: https://developer.apple.com/metal/tensorflow-plugin/ However, when I attempt to import tensorflow, I get this error: RuntimeError Traceback (most recent call last) RuntimeError: module compiled against API version 0x10 but this version of numpy is 0xf Output exceeds the size limit. Open the full output data in a text editor ImportError Traceback (most recent call last) ImportError: numpy.core.multiarray failed to import The above exception was the direct cause of the following exception: SystemError Traceback (most recent call last) SystemError: <built-in method contains of dict object at 0x107c68040> returned a result with an error set The above exception was the direct cause of the following exception: ImportError Traceback (most recent call last) Cell In [2], line 1 ----> 1 import tensorflow as tf File ~/opt/miniconda3/envs/speaker_recognition/lib/python3.8/site-packages/tensorflow/init.py:37 34 import sys as _sys 35 import typing as _typing ---> 37 from tensorflow.python.tools import module_util as _module_util 38 from tensorflow.python.util.lazy_loader import LazyLoader as _LazyLoader 40 # Make sure code inside the TensorFlow codebase can use tf2.enabled() at import. File ~/opt/miniconda3/envs/speaker_recognition/lib/python3.8/site-packages/tensorflow/python/init.py:37 29 # We aim to keep this file minimal and ideally remove completely. 30 # If you are adding a new file with @tf_export decorators, ... ---> 19 from tensorflow.python.client._pywrap_tf_session import * 20 from tensorflow.python.client._pywrap_tf_session import _TF_SetTarget 21 from tensorflow.python.client._pywrap_tf_session import _TF_SetConfig ImportError: initialization failed What else can I try to get tensorflow operational and using my M1's GPU?
Replies
2
Boosts
3
Views
2.7k
Activity
Nov ’22
Why Python native on M1 Max is greatly slower than Python on old Intel i5?
I just got my new MacBook Pro with M1 Max chip and am setting up Python. I've tried several combinational settings to test speed - now I'm quite confused. First put my questions here: Why python run natively on M1 Max is greatly (~100%) slower than on my old MacBook Pro 2016 with Intel i5? On M1 Max, why there isn't significant speed difference between native run (by miniforge) and run via Rosetta (by anaconda) - which is supposed to be slower ~20%? On M1 Max and native run, why there isn't significant speed difference between conda installed Numpy and TensorFlow installed Numpy - which is supposed to be faster? On M1 Max, why run in PyCharm IDE is constantly slower ~20% than run from terminal, which doesn't happen on my old Intel Mac. Evidence supporting my questions is as follows: Here are the settings I've tried: 1. Python installed by Miniforge-arm64, so that python is natively run on M1 Max Chip. (Check from Activity Monitor, Kind of python process is Apple). Anaconda.: Then python is run via Rosseta. (Check from Activity Monitor, Kind of python process is Intel). 2. Numpy installed by conda install numpy: numpy from original conda-forge channel, or pre-installed with anaconda. Apple-TensorFlow: with python installed by miniforge, I directly install tensorflow, and numpy will also be installed. It's said that, numpy installed in this way is optimized for Apple M1 and will be faster. Here is the installation commands: conda install -c apple tensorflow-deps python -m pip install tensorflow-macos python -m pip install tensorflow-metal 3. Run from Terminal. PyCharm (Apple Silicon version). Here is the test code: import time import numpy as np np.random.seed(42) a = np.random.uniform(size=(300, 300)) runtimes = 10 timecosts = [] for _ in range(runtimes): s_time = time.time() for i in range(100): a += 1 np.linalg.svd(a) timecosts.append(time.time() - s_time) print(f'mean of {runtimes} runs: {np.mean(timecosts):.5f}s') and here are the results: +-----------------------------------+-----------------------+--------------------+ | Python installed by (run on)→ | Miniforge (native M1) | Anaconda (Rosseta) | +----------------------+------------+------------+----------+----------+---------+ | Numpy installed by ↓ | Run from → | Terminal | PyCharm | Terminal | PyCharm | +----------------------+------------+------------+----------+----------+---------+ | Apple Tensorflow | 4.19151 | 4.86248 | / | / | +-----------------------------------+------------+----------+----------+---------+ | conda install numpy | 4.29386 | 4.98370 | 4.10029 | 4.99271 | +-----------------------------------+------------+----------+----------+---------+ This is quite slow. For comparison, run the same code on my old MacBook Pro 2016 with i5 chip - it costs 2.39917s. another post reports that run with M1 chip (not Pro or Max), miniforge+conda_installed_numpy is 2.53214s, and miniforge+apple_tensorflow_numpy is 1.00613s. you may also try on it your own. Here is the CPU information details: My old i5: $ sysctl -a | grep -e brand_string -e cpu.core_count machdep.cpu.brand_string: Intel(R) Core(TM) i5-6360U CPU @ 2.00GHz machdep.cpu.core_count: 2 My new M1 Max: % sysctl -a | grep -e brand_string -e cpu.core_count machdep.cpu.brand_string: Apple M1 Max machdep.cpu.core_count: 10 I follow instructions strictly from tutorials - but why would all these happen? Is it because of my installation flaws, or because of M1 Max chip? Since my work relies heavily on local runs, local speed is very important to me. Any suggestions to possible solution, or any data points on your own device would be greatly appreciated :)
Replies
11
Boosts
1
Views
33k
Activity
Nov ’22
Failed task "pod install" on M1 Chip
Hello! I am trying to install pods for a react native app , but I can't install the pods with the M1 Chip. I tried several times with different approaches like the following: sudo arch -x86_64 gem install ffi arch -x86_64 pod install or installing via rosetta terminal or installing with homebrew or switching to another ruby version (ruby-2.7.5) with rvm use but "pod install" always fails with the following error message: `incompatible library version - /Users/user/.rvm/gems/ruby-3.0.0/gems/ffi-1.15.5/lib/ffi_c.bundle´ it seems like the current ruby version is not compatible with the ffi and the cocoapods version. Can anyone help me or have another idea why it does not work? I think another problem could be that it uses different ruby versions within the process of installation because I have ruby installed with homebrew and on another location too.
Replies
1
Boosts
0
Views
1.7k
Activity
Nov ’22
Cannot unset schg on M1 Mac
Hi. I am using a Mac mini with M1. I created a symlink on the Desktop folder and set schg flag so that the system would not modify the link. Now I want to revert Desktop back to a normal folder, but the flag cannot be removed with this command: sudo chflags schg [path] Normally, booting in Single User Mode is advised for removing this specific flag since the system cannot alter anything when schg flag is set. But there is no longer Single User Mode in M1 Macs. I tried removing the flag in Recovery mode with the same command but it didn't help. What is the correct way to unset schg flag in M1 Macs? Thanks
Replies
3
Boosts
0
Views
4.1k
Activity
Nov ’22
Not Able to Build Some Versions of Python on M1 at 12.3.1
I trying to build older version of python such as 3.6, 3.7, 3.8 using pyenv and having build failures. I am on apple silicon and the last macOS 12.3.1. In older OS these versions would build fine. Following is the failure I get running pyenv install 3.6.9 python-build: use openssl@1.1 from homebrew python-build: use readline from homebrew Downloading Python-3.6.9.tar.xz... -> https://www.python.org/ftp/python/3.6.9/Python-3.6.9.tar.xz Installing Python-3.6.9... python-build: use readline from homebrew python-build: use zlib from xcode sdk BUILD FAILED (OS X 12.3.1 using python-build 20180424) Inspect or clean up the working tree at /var/folders/sn/46fncn513kng4ssgwn398m5h0000gn/T/python-build.20220403110510.8666 Results logged to /var/folders/sn/46fncn513kng4ssgwn398m5h0000gn/T/python-build.20220403110510.8666.log Last 10 log lines: checking for --with-cxx-main=<compiler>... no checking for clang++... no configure:   By default, distutils will build C++ extension modules with "clang++".   If this is not intended, then set CXX on the configure command line.    checking for the platform triplet based on compiler characteristics... darwin configure: error: internal configure error for the platform triplet, please file a bug report make: *** No targets specified and no makefile found.  Stop.
Replies
3
Boosts
1
Views
12k
Activity
Nov ’22
TWO errors at the same time when running UITests on a simulator on a M1 Max MacBook
I get two error windows at the same time when I try to run UITests using a simulator in the newest XCode Version 14.1 (14B47b): Could not attach to PID Problem report Could not attach to pid : “3297” Domain: IDEDebugSessionErrorDomain Code: 3 Failure Reason: tried to attach to process already being debugged User Info: {   DVTErrorCreationDateKey = "2022-11-03 00:53:03 +0000";   DVTRadarComponentKey = 855031;   IDERunOperationFailingWorker = DBGLLDBLauncher;   RawUnderlyingErrorMessage = "tried to attach to process already being debugged"; } -- Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {   "device_model" = "iPhone15,2";   "device_osBuild" = "16.1 (20B72)";   "device_platform" = "com.apple.platform.iphonesimulator";   "launchSession_schemeCommand" = Test;   "launchSession_state" = 1;   "launchSession_targetArch" = "x86_64";   "operation_duration_ms" = 37573;   "operation_errorCode" = 3;   "operation_errorDomain" = IDEDebugSessionErrorDomain;   "operation_errorWorker" = DBGLLDBLauncher;   "operation_name" = IDERunOperationWorkerGroup;   "param_consoleMode" = 0;   "param_debugger_attachToExtensions" = 0;   "param_debugger_attachToXPC" = 1;   "param_debugger_type" = 3;   "param_destination_isProxy" = 0;   "param_destination_platform" = "com.apple.platform.iphonesimulator";   "param_diag_MainThreadChecker_stopOnIssue" = 0;   "param_diag_MallocStackLogging_enableDuringAttach" = 0;   "param_diag_MallocStackLogging_enableForXPC" = 0;   "param_diag_allowLocationSimulation" = 1;   "param_diag_checker_tpc_enable" = 0;   "param_diag_gpu_frameCapture_enable" = 3;   "param_diag_gpu_shaderValidation_enable" = 0;   "param_diag_gpu_validation_enable" = 1;   "param_diag_memoryGraphOnResourceException" = 0;   "param_diag_queueDebugging_enable" = 1;   "param_diag_runtimeProfile_generate" = 0;   "param_diag_sanitizer_asan_enable" = 0;   "param_diag_sanitizer_tsan_enable" = 0;   "param_diag_sanitizer_tsan_stopOnIssue" = 0;   "param_diag_sanitizer_ubsan_stopOnIssue" = 0;   "param_diag_showNonLocalizedStrings" = 0;   "param_diag_viewDebugging_enabled" = 1;   "param_diag_viewDebugging_insertDylibOnLaunch" = 0;   "param_install_style" = 2;   "param_launcher_UID" = 2;   "param_launcher_allowDeviceSensorReplayData" = 0;   "param_launcher_kind" = 0;   "param_launcher_style" = 0;   "param_launcher_substyle" = 64;   "param_runnable_appExtensionHostRunMode" = 0;   "param_runnable_productType" = "com.apple.product-type.application";   "param_runnable_type" = 1;   "param_testing_launchedForTesting" = 1;   "param_testing_suppressSimulatorApp" = 0;   "param_testing_usingCLI" = 0;   "sdk_canonicalName" = "iphonesimulator16.1";   "sdk_osVersion" = "16.1";   "sdk_variant" = iphonesimulator; } -- System Information macOS Version 13.0 (Build 22A380) Xcode 14.1 (21534.1) (Build 14B47b) Timestamp: 2022-11-02T20:53:03-04:00 . . . This has been happening consistently. When I proceed to try and "Device" ==> "erase all contents and settings" on the Simulator, I get another error "Simulator quit unexpectedly": Overal, my development experience on my M1 Max has been very miserable. I've been having major issues on two separate M1 Max machines with fresh OS installs. I would appreciate
Replies
3
Boosts
0
Views
2.1k
Activity
Nov ’22
iOS project giving build errors after upgrading macOS to Ventura 13.0 and xcode to 14.0.1
My macbook pro has M2 chip. I had macOS Monterey and xcode 13.4.1 in my system and my iOS project was building and running properly. Then I updated macOS to Ventura 13.0 and xcode to 14.0.1. At first, I got errors regarding bitcode. I set "Enable Bitcode" option to "no" in all targets, including pod targets. Now I'm getting many other errors. One error I noticed as something important is regarding bridging header. :0: error: failed to emit precompiled header '/Library/Developer/Xcode/DerivedData/project-aizvv/Build/Intermediates.noindex/PrecompiledHeaders/project-Bridging-Header-swift_37CYKUIBOA6M1-clang_3BJMUTP0IBSLM.pch' for bridging header '/myPath/project-Bridging-Header.h' Another error is from GoogleSignIn. GoogleSignIn was installed through cocoapod. And in xcode 14, it is asking to specify development team in signing section. could not build module 'GoogleSignIn' 1. while building module 'GoogleSignIn' imported from /myPath/project-Bridging-Header.h:6: There are many such errors from different pods. could not build module 'GTMSessionFetcher' redefinition of 'GTMSessionFetcherError' And on top of all the errors, error build: too many errors emitted, stopping now Why all these issues are coming after macOS and xcode update? Is there any way I can continue development without disabling bitcode?
Replies
3
Boosts
0
Views
2.1k
Activity
Nov ’22
UTType always return nil when testing on M1 Mac simulator with x86 arch
(environment: macOS 11.4, Xcode 12.4, iOS simulator 14.4) The below test does not passed when a project's architectures for "Any iOS Simulator SDK" contains X86_64 only. (Open a new project with architectures arm64 passes) import UniformTypeIdentifiers class UTTypeTests: XCTestCase {     func testThatItConvertsFromMIMEType() {         if #available(iOS 14.0, *) {             guard let mp4Type = UTType(mimeType: "video/mp4") else {                 return XCTFail("Could not decode from MIME type.")             }                          XCTAssertEqual(mp4Type, UTType.mpeg4Movie)         } else {         }   } } similar issue happens on deprecated method UTTypeCopyPreferredTagWithClass
Replies
4
Boosts
0
Views
3.4k
Activity
Oct ’22
Error when trying to use Tensorflow mixed-precision on M1 Pro
I tried training my model on my M1 Pro using Tensorflow's mixed-precision, hoping it will boost the performance, but I got an error: .../mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm:289:0: error: 'mps.select' op failed to verify that all of {true_value, false_value, result} have same element type .../mpsgraph/MetalPerformanceShadersGraph/Core/Files/MPSGraphUtilities.mm:289:0: note: see current operation: %5 = "mps.select"(%4, %3, %2) : (tensor<1xi1>, tensor<1xf16>, tensor<1xf32>) -> tensor<1xf16>
Replies
1
Boosts
0
Views
2.1k
Activity
Oct ’22
iOS app running on M1 has issues with UIImagePickerController AND PHPickerViewController
Hi, I have an established iOS app that runs great on iOS. Recently I have been working on the M1 version of the app, which is running from the iOS code. This is not a catalyst issue, it's an iOS app running on M1. Most of the app looks great and functions as expected. However, when I present a UIImagePickerController OR a PHPickerViewController, my test users are experiencing that they cannot click to select an image (images do appear, it's the "clicking" that does not seem to register), and also cannot click the "cancel" button - if they click on the very far left of the "Cancel" button, it does work. All other UIButtons etc work correctly throughout the rest of the app - it's only UIImagePickerController and PHPhotoPickerController that seem to have this issue. I am not experiencing this issue myself when I build the app from Xcode, nor do I see the issue when I run the binary that I have sent to my testers. What could the issue be here? There is obviously some difference between our machines (they do not have xcode installed, for instance), but we are running the same version of macOS Monterey (12.5.1).
Replies
4
Boosts
1
Views
1.3k
Activity
Oct ’22
TN3117: Resolving architecture build errors on Apple silicon
Update your app’s architecture build settings to support building macOS, iOS, watchOS and tvOS apps on Apple silicon. View Technote TN3117 &amp;gt;
Replies
0
Boosts
0
Views
1.7k
Activity
Oct ’22
Xcode GPU captured frame profiling numbers don't match
Hi, Trying to understand about the Xcode's GPU profiling information. I have one vertex shader and I only have one draw call. When capturing a frame, I get 72us in the Summary: And in the "GPU report" I'm getting ~6ms: How do both metrics relate with each other and why is there so much difference between them? Thanks
Replies
1
Boosts
1
Views
1.3k
Activity
Oct ’22
Homebrew directories different on Apple Silicon than macOS Intel
My C++ code won't compile on my new Mac (with Apple Silicon) because it can't find gsl libraries. I think this is because Homebrew uses /opt/homebrew for Apple Silicon, and /usr/local for macOS Intel, and my code is looking for gsl in /usr/local. How can I get my code to find gsl on my new Mac?
Replies
1
Boosts
0
Views
874
Activity
Oct ’22