Make large-scale mathematical computations and image calculations, optimized for high performance.
Questions tagged [accelerate]
74 questions
2
votes
1 answer
Anaconda Accelerate check_cuda()
What is the correct anaconda accelerate function to check cuda?
With numba-pro you could use:
>>> from numbapro import check_cuda
numbapro:1: ImportWarning: The numbapro package is deprecated in favour of the accelerate package. Please update your…

Lundy
- 663
- 5
- 19
1
vote
0 answers
Training a transformer on SLURM
I have a script for finetuning a transformer which is based on this tutorial. I am running it on a remote SLURM based server. When I execute it interactively from the command line, it runs and produces the desired output. However, when I submit it…

munchanr
- 11
- 1
1
vote
1 answer
Array of pixel values for vImage PixelBuffer produces black bar in image
In the code shown below, I'm generating an array of RGB pixel values for the vImage.PixelBuffer and creating an image from that buffer. But the generated image contains a black bar. Any ideas on what is causing the black bar?
import Accelerate
let…

wigging
- 8,492
- 12
- 75
- 117
1
vote
2 answers
How does one use accelerate with the hugging face (HF) trainer?
What are the code changes one has to do to run accelerate with a trianer?
I keep seeing:
from accelerate import Accelerator
accelerator = Accelerator()
model, optimizer, training_dataloader, scheduler = accelerator.prepare(
model, optimizer,…

Charlie Parker
- 5,884
- 57
- 198
- 323
1
vote
0 answers
How can I resolve ModuleNotFoundError when importing accelerate despite it being listed under 'pip3 list'?
I have done pip3 install accelerate
pip3 list shows:
accelerate 0.19.0
certifi 2023.5.7
charset-normalizer 3.1.0
cmake 3.26.3
filelock 3.12.0
idna 3.4
Jinja2…

user2719323
- 21
- 2
1
vote
1 answer
How to safely call DSPSplitComplex without compiler warnings
I'm trying to call the function DSPSplitComplex:
var real = [Float](input_windowed)
var imaginary = [Float](repeating: 0.0, count: input_windowed.count)
var splitComplex = DSPSplitComplex(realp: &real, imagp: &imaginary)
but that…

pnadeau
- 427
- 5
- 8
1
vote
1 answer
Not able to select an option on Google Colab
I used the commad
!accelerate config
The cell keeps running and i am not able to chose from any of the options.
Image of the error
I tried writing the option, selecting the number of choice as well.

Hrushi
- 11
- 2
1
vote
1 answer
Conversion of kCVPixelFormatType_420YpCbCrBiPlanarVideoRange to kCVPixelFormatType_32BGRA
In an iOS app I am working on, the image is captured in kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange(to be send over in network) but later in the app I want it converted to kCVPixelFormatType_32BGRA (to be used for Deep Learning inference).
I am…

Kiran Scaria
- 41
- 6
1
vote
1 answer
How do I link the Accelerate Framework to a c program in MacOs?
I just started with c development and I need to compile and link a program which uses the Accelerate Framework from Apple:
Simple example accelerate.c:
#include
#include
double vectorvector_product(double * a,…

ИванКарамазов
- 442
- 2
- 17
1
vote
0 answers
GRU Pytorch Keras and Formula in Wiki are different
I am implementing GRU in iOS device using cblas library. And I used formula of GRU from Wiki, and also the same formula like in Wikipedia I learned on Coursera. And I found that results with the same weights in my implementation and tf.Keras are…

Oleksii Moisieienko
- 51
- 2
1
vote
0 answers
Conforming CGPoint to AccelerateMutableBuffer to use vDSP
I'd like to perform some math on a fairly large number of CGPoint instances stored in an array so I thought I'd look into using Accelerate and start by conforming CGPoint to AccelerateMutableBuffer, followed by extending Array to conform as…

wltrup
- 778
- 1
- 4
- 14
1
vote
1 answer
Element-wise maximum value for two arrays with Accelerate
Given two arrays of floats
let A: [Float] = [a1, a2, a3, a4, ...]
let B: [Float] = [b1, b2, b3, b4, ...]
how, with Accelerate can I get an array giving me the maximum value of the two arrays, i.e. how to obtain
let R = [max(a1, b1), max(a2, b2),…

Sanich
- 1,739
- 6
- 25
- 43
1
vote
1 answer
Sum 2 consecutive elements in an array
I have a pointer to array of floats: arr = [a0, a1, a2, a3, ..., an].
I want the result to be: result = [a0+a1, a0+a1, a2+a3, a2+a3, a4+a5, a4+a5, ...].
Now I'm doing it with map() function:
let multiArrayValue: MLMultiArray = someMulityArray
let…

Sanich
- 1,739
- 6
- 25
- 43
1
vote
2 answers
Fatal error when using withMemoryRebound in iOS/Swift
I have the following code to create a table for sampling an image in iOS using the Swift accelerate functions
When I rebound the memory to UInt16 which the table creation expects from Int which is the original type I get a fatal error.
var arr =…

Pavan K
- 4,085
- 8
- 41
- 72
1
vote
1 answer
For vDSP_fft_zropD the packed results seem to be wrong. Is this a bug or am I doing something wrong
I have the following code which does a DFT on a ramp using Swift and Accelerate
import Foundation
import Accelerate
let N = 16
var xdtar = UnsafeMutablePointer.allocate(capacity: N)
var xdtai = UnsafeMutablePointer.allocate(capacity:…

JVSIP
- 381
- 1
- 9