![]() |
![]() |
#1 |
Apr 2019
2·11 Posts |
![]()
Hi,
I've had a growing interest in all things factoring & primality testing for the last six+ months, in which time I've been reading a multitude of articles and some books on the topic. Along the way it occurred to me that most appleTV devices sit unused ~22+ hours a day, and that is a LOT of idle computing power. It'd be nice have an appleTV app for Mersenne trial factoring, or other prime search computation tasks, to tap all that unused computation power. My background is as a Mac Software Engineer (mostly automation & app-level UI type coding, not deep scientific computing / or low-level GPU stuff) and used to work at Apple on their AVFoundation video capture/editing/export framework for macOS/iOS/appleTV. My primary development language for the last 15+ years has been Objective-C, and I pretty much never touch Windows/Linux boxes, and rarely venture outside the niceties and convenience of Xcode, Objective-C, Apple application frameworks. I've noticed of the various prime related software projects out there (gpuOwl, mfakto, mfactc, clLucas, llrCUDA, CUDALucas, Prime95, etc) most are Linux/Windows targeted, but may run on Macs as an afterthought. Where inline assembly is used it always seems to only be available as x86/x64, and not ARM, leaving iOS/appleTV unavailable as targets. And all the GPU accelerated stuff is CUDA or OpenCL. While Apple was the original developer of OpenCL, they have since abandoned it on the Mac, with their proprietary Metal framework replacing it and providing seamless GPU access across the Mac, iOS, and appleTV devices. (Yes, you can still compile & run OpenCL for now.) At any rate, I'd be interested in working on a project to re-implement / migrate some of the existing prime search tools out there to the macOS/iOS/appleTV platforms including use of Apple's modern Metal framework for GPU based computation. (That might also require ARM assembly development for the inlined manual assembly optimizations.) I've got a full-time job, so this would just be a part-time project, but I could see devoting 10-15 hours per week on it. Ideally, I'd love to find one or two other people interested in working on this also. If there is anyone else out there that also has some interest in working on a project like this please respond below or PM me. It'd be great to partner with someone with some GPU experience or ARM assembly experience as I'm lacking in those areas, but really the primary thing is just someone to bounce ideas off of, plan out the development, and collaborate with along the way to building out some tools/apps for prime searching on appleTV/iOS devices. Looking forward to talking to you soon! :-) |
![]() |
![]() |
![]() |
#2 |
∂2ω=0
Sep 2002
República de California
2D4216 Posts |
![]()
FYI, Mlucas - see separate subforum under 'Software' - runs on Mac and has ARMv8 assembly, but no GPU support.
|
![]() |
![]() |
![]() |
#3 |
"Mark"
Apr 2003
Between here and the
24×32×43 Posts |
![]()
As the write of the mtsieve framework, I would love to have ARM assembly functions to correspond to the x86 ones. It is written in C++ and some of the sieves can use OpenCL. It compiles on Windows, OS X, and Linux, so it is designed to be portable. I can attest to the OS X part as I have used Macs since the original 128. I just don't integrate with Xcode as I use the command line tools for portability. Most of the x86 functions are fairly short and describe what they do (although the how is not always as obvious).
mtsieve isn't used to do primality tests, but most people use the various programs built upon the framework for their own pet projects. |
![]() |
![]() |
![]() |
#4 | |
Apr 2019
101102 Posts |
![]() Quote:
Also, just realized/remembered that inline assembly code may be forbidden for appleTV apps to be distributed via the AppStore. I know they need to be in LLVM Bitcode, and I think that means no raw inline assembly can be used, or maybe just another hoop to jump though to be complaint. I'll have to look into that. |
|
![]() |
![]() |
![]() |
#5 | |
Apr 2019
2·11 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#6 |
Bemusing Prompter
"Danny"
Dec 2002
California
2·32·131 Posts |
![]()
I recently added macOS support to mfakto. It's not in the official repository yet as the author isn't very active these days, but you can check out one of the forks:
https://github.com/preda/mfakto https://github.com/ixfd64/mfakto Last fiddled with by ixfd64 on 2019-06-20 at 16:26 |
![]() |
![]() |
![]() |
#7 | |
Apr 2019
2×11 Posts |
![]() Quote:
|
|
![]() |
![]() |
![]() |
#8 |
Apr 2019
2×11 Posts |
![]()
After doing some research it turns out if I want to distribute the appleTV app via the Apple AppStore, then I can't use any ARM assembly directly. A few years back they started requiring bitcode for all appleTV app submissions -- basically LLVM IR (intermediate representation), which Apple then compiles down to the real app they distribute via the AppStore. And you can't have any assembly in the LLVM IR. But I can still do an appleTV app that uses the Metal framework for GPU acceleration. And could conceivably do an appleTV app with ARM assembly that could only be used on jailbroken appleTVs (which may be worth toying with for a small appleTV compute cluster, but I probably don't want to get into distributing it.)
|
![]() |
![]() |
![]() |
#9 |
"Composite as Heck"
Oct 2017
22×5×37 Posts |
![]()
I applaud your willingness to try and navigate all the roadblocks that Apple has introduced to block people from using the hardware as they wish. It's all a big bag of awful that most can't justify touching no matter how long the pole. Good luck.
|
![]() |
![]() |
![]() |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trial Factoring Elimination up to 2^64 Project | tapion64 | PrimeNet | 31 | 2014-04-12 02:42 |
NOT the official forum factoring project thread | jyb | Factoring | 2 | 2013-09-03 16:11 |
Any interest in some low n ECM factoring? | ltd | Prime Sierpinski Project | 19 | 2005-08-12 06:24 |
New k*2^n+-1 factoring project | mklasson | Factoring | 2 | 2004-03-06 15:07 |