Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

RuntimeError: In function void opencl::fft_inplace

Open
#255 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
backend

Research direction

Reproduce the Python example with ArrayFire 3.8.0, the OpenCL backend, and Nvidia OpenCL drivers. Start with af.signal.fft and the reported src/backend/opencl/fft.cpp path, then inspect the generated FFT kernel and build log; done means the example completes without the malformed-kernel RuntimeError.

Written by the indexing model from the issue text.

Description

Using this arrayfire release (https://arrayfire.s3.amazonaws.com/3.8.0/ArrayFire-v3.8.0_Linux_x86_64.sh) on the opencl backend with the python api I get the following error.

import arrayfire as af
af.set_backend('opencl')
random_signal = af.random.randn(100)
test = af.signal.fft(random_signal)

Error

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
<ipython-input-7-a744aa37e707> in <module>
----> 1 test = af.signal.fft(random_signal)

~/miniconda3/envs/af/lib/python3.7/site-packages/arrayfire/signal.py in fft(signal, dim0, scale)
    177 
    178     output = Array()
--> 179     safe_call(backend.get().af_fft(c_pointer(output.arr), signal.arr, c_double_t(scale), c_dim_t(dim0)))
    180     return output
    181 

~/miniconda3/envs/af/lib/python3.7/site-packages/arrayfire/util.py in safe_call(af_error)
     77         err_len = c_dim_t(0)
     78         backend.get().af_get_last_error(c_pointer(err_str), c_pointer(err_len))
---> 79         raise RuntimeError(to_str(err_str))
     80 
     81 def get_version():

RuntimeError: In function void opencl::fft_inplace(opencl::Array<T>&, int, bool) [with T = cl_float2]
In file src/backend/opencl/fft.cpp:

I'm running Ubuntu 20.04 with Nvidia OpenCL Drivers. I have arrayfire debugging enabled and got the following output when the error occurred.

                        BUILD LOG
************************************************
<kernel>:19:10: error: expected expression
(float2)(};
         ^
<kernel>:891:1: error: expected '}'
^
<kernel>:18:32: note: to match this '{'
__constant float2 twiddles[] = {
                               ^
<kernel>:890:2: error: expected ';' after top level declarator
}
 ^
 ;

************************************************
FFTGeneratedStockhamAction::compileKernels failed

Dominant language
Python
Stars
422
Forks
63
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from arrayfire/arrayfire-python

All issues in arrayfire/arrayfire-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.