hip.hipfft

Contents

hip.hipfft#

(No short description)

Attributes:
HIPFFT_FORWARD (int):

Macro constant.

HIPFFT_BACKWARD (int):

Macro constant.

hipfftResult:

alias of hipfftResult_t

hipfftType:

alias of hipfftType_t

hipfftLibraryPropertyType:

alias of hipfftLibraryPropertyType_t

hipfftHandle:

alias of hipfftHandle_t

class hip.hipfft.hipfftResult_t(value)#

Bases: _hipfftResult_t__Base

Result/status/error codes

Attributes:
HIPFFT_SUCCESS:

hipFFT operation was successful

HIPFFT_INVALID_PLAN:

hipFFT was passed an invalid plan handle

HIPFFT_ALLOC_FAILED:

hipFFT failed to allocate GPU or CPU memory

HIPFFT_INVALID_TYPE:

No longer used

HIPFFT_INVALID_VALUE:

User specified an invalid pointer or parameter

HIPFFT_INTERNAL_ERROR:

Driver or internal hipFFT library error

HIPFFT_EXEC_FAILED:

Failed to execute an FFT on the GPU

HIPFFT_SETUP_FAILED:

hipFFT failed to initialize

HIPFFT_INVALID_SIZE:

User specified an invalid transform size

HIPFFT_UNALIGNED_DATA:

No longer used

HIPFFT_INCOMPLETE_PARAMETER_LIST:

Missing parameters in call

HIPFFT_INVALID_DEVICE:

Execution of a plan was on different GPU than plan creation

HIPFFT_PARSE_ERROR:

Internal plan database error

HIPFFT_NO_WORKSPACE:

No workspace has been provided prior to plan execution

HIPFFT_NOT_IMPLEMENTED:

Function does not implement functionality for parameters given.

HIPFFT_NOT_SUPPORTED:

Operation is not supported for parameters given.

conjugate()#

Returns self, the complex conjugate of any int.

bit_length()#

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
bit_count()#

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
to_bytes(length, byteorder, *, signed=False)#

Return an array of bytes representing an integer.

length

Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.

signed

Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

from_bytes(byteorder, *, signed=False)#

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.

signed

Indicates whether two’s complement is used to represent the integer.

as_integer_ratio()#

Return integer ratio.

Return a pair of integers, whose ratio is exactly equal to the original int and with a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
real#

the real part of a complex number

imag#

the imaginary part of a complex number

numerator#

the numerator of a rational number in lowest terms

denominator#

the denominator of a rational number in lowest terms

static ctypes_type()#

The type of the enum constants as ctypes type.

HIPFFT_SUCCESS = 0#
HIPFFT_INVALID_PLAN = 1#
HIPFFT_ALLOC_FAILED = 2#
HIPFFT_INVALID_TYPE = 3#
HIPFFT_INVALID_VALUE = 4#
HIPFFT_INTERNAL_ERROR = 5#
HIPFFT_EXEC_FAILED = 6#
HIPFFT_SETUP_FAILED = 7#
HIPFFT_INVALID_SIZE = 8#
HIPFFT_UNALIGNED_DATA = 9#
HIPFFT_INCOMPLETE_PARAMETER_LIST = 10#
HIPFFT_INVALID_DEVICE = 11#
HIPFFT_PARSE_ERROR = 12#
HIPFFT_NO_WORKSPACE = 13#
HIPFFT_NOT_IMPLEMENTED = 14#
HIPFFT_NOT_SUPPORTED = 16#
hip.hipfft.hipfftResult#

alias of hipfftResult_t

class hip.hipfft.hipfftType_t(value)#

Bases: _hipfftType_t__Base

Transform type

Attributes:
HIPFFT_R2C:

Real to complex (interleaved)

HIPFFT_C2R:

Complex (interleaved) to real

HIPFFT_C2C:

Complex to complex (interleaved)

HIPFFT_D2Z:

Double to double-complex (interleaved)

HIPFFT_Z2D:

Double-complex (interleaved) to double

HIPFFT_Z2Z:

Double-complex to double-complex (interleaved)

conjugate()#

Returns self, the complex conjugate of any int.

bit_length()#

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
bit_count()#

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
to_bytes(length, byteorder, *, signed=False)#

Return an array of bytes representing an integer.

length

Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.

signed

Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

from_bytes(byteorder, *, signed=False)#

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.

signed

Indicates whether two’s complement is used to represent the integer.

as_integer_ratio()#

Return integer ratio.

Return a pair of integers, whose ratio is exactly equal to the original int and with a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
real#

the real part of a complex number

imag#

the imaginary part of a complex number

numerator#

the numerator of a rational number in lowest terms

denominator#

the denominator of a rational number in lowest terms

static ctypes_type()#

The type of the enum constants as ctypes type.

HIPFFT_R2C = 42#
HIPFFT_C2R = 44#
HIPFFT_C2C = 41#
HIPFFT_D2Z = 106#
HIPFFT_Z2D = 108#
HIPFFT_Z2Z = 105#
hip.hipfft.hipfftType#

alias of hipfftType_t

class hip.hipfft.hipfftLibraryPropertyType_t(value)#

Bases: _hipfftLibraryPropertyType_t__Base

Attributes:
HIPFFT_MAJOR_VERSION:

(undocumented)

HIPFFT_MINOR_VERSION:

(undocumented)

HIPFFT_PATCH_LEVEL:

(undocumented)

conjugate()#

Returns self, the complex conjugate of any int.

bit_length()#

Number of bits necessary to represent self in binary.

>>> bin(37)
'0b100101'
>>> (37).bit_length()
6
bit_count()#

Number of ones in the binary representation of the absolute value of self.

Also known as the population count.

>>> bin(13)
'0b1101'
>>> (13).bit_count()
3
to_bytes(length, byteorder, *, signed=False)#

Return an array of bytes representing an integer.

length

Length of bytes object to use. An OverflowError is raised if the integer is not representable with the given number of bytes.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.

signed

Determines whether two’s complement is used to represent the integer. If signed is False and a negative integer is given, an OverflowError is raised.

from_bytes(byteorder, *, signed=False)#

Return the integer represented by the given array of bytes.

bytes

Holds the array of bytes to convert. The argument must either support the buffer protocol or be an iterable object producing bytes. Bytes and bytearray are examples of built-in objects that support the buffer protocol.

byteorder

The byte order used to represent the integer. If byteorder is ‘big’, the most significant byte is at the beginning of the byte array. If byteorder is ‘little’, the most significant byte is at the end of the byte array. To request the native byte order of the host system, use `sys.byteorder’ as the byte order value.

signed

Indicates whether two’s complement is used to represent the integer.

as_integer_ratio()#

Return integer ratio.

Return a pair of integers, whose ratio is exactly equal to the original int and with a positive denominator.

>>> (10).as_integer_ratio()
(10, 1)
>>> (-10).as_integer_ratio()
(-10, 1)
>>> (0).as_integer_ratio()
(0, 1)
real#

the real part of a complex number

imag#

the imaginary part of a complex number

numerator#

the numerator of a rational number in lowest terms

denominator#

the denominator of a rational number in lowest terms

static ctypes_type()#

The type of the enum constants as ctypes type.

HIPFFT_MAJOR_VERSION = 0#
HIPFFT_MINOR_VERSION = 1#
HIPFFT_PATCH_LEVEL = 2#
hip.hipfft.hipfftLibraryPropertyType#

alias of hipfftLibraryPropertyType_t

class hip.hipfft.hipfftHandle_t#

Bases: Pointer

Python wrapper for cdef class chipfft.hipfftHandle_t.

Python wrapper for cdef class chipfft.hipfftHandle_t.

If this type is initialized via its __init__ method, it allocates a member of the underlying C type and destroys it again if the wrapper type is deallocated.

This type also serves as adapter when appearing as argument type in a function signature. In this case, the type can further be initialized from a number of Python objects:

  • None:

    This will set the self._ptr attribute to NULL.

  • int:

    Interprets the integer value as pointer address and writes it to self._ptr. No ownership is transferred.

  • ctypes.c_void_p:

    Takes the pointer address pyobj.value and writes it to self._ptr. No ownership is transferred.

  • object that implements the CUDA Array Interface protocol:

    Takes the integer-valued pointer address, i.e. the first entry of the data tuple from pyobj’s member __cuda_array_interface__ and writes it to self._ptr.

  • object that implements the Python buffer protocol:

    If the object represents a simple contiguous array, writes the Py_buffer associated with pyobj to self._py_buffer, sets the self._py_buffer_acquired flag to True, and writes self._py_buffer.buf to the data pointer self._ptr.

  • hip._util.types.Pointer:

    Takes the pointer address pyobj._ptr and writes it to self._ptr. No ownership is transferred.

Type checks are performed in the above order.

C Attributes:
_ptr (C type void *, protected):

Stores a pointer to the data of the original Python object.

_is_ptr_owner (C type bint, protected):

If this wrapper is the owner of the underlying data.

_py_buffer (C type ``Py_buffer`, protected):

Stores a pointer to the data of the original Python object.

_py_buffer_acquired (C type bint, protected):

Stores a pointer to the data of the original Python object.

static PROPERTIES()#
__getitem__(key, /)#

Return self[key].

__init__()#

Constructor.

Args:
pyobj (object):

See the class description Pointer for information about accepted types for pyobj. Defaults to None.

Raises:

TypeError: If the input object pyobj is not of the right type.

as_c_void_p(self)#

Returns the data’s address as ctypes.c_void_p Note:

Implemented as function to not collide with autogenerated property names.

createRef(self) Pointer#

Creates are reference to this pointer.

Returns a Pointer that stores the address of this `~.Pointer’s data pointer.

Note:

No ownership information is transferred.

static fromObj(pyobj)#

Creates a hipfftHandle_t from a Python object.

Derives a hipfftHandle_t from the given Python object pyobj. In case pyobj is itself an hipfftHandle_t reference, this method returns it directly. No new hipfftHandle_t is created in this case.

is_ptr_null#

If data pointer is NULL.

hip.hipfft.hipfftHandle#

alias of hipfftHandle_t

hip.hipfft.hipfftPlan1d(int nx, type, int batch)#

Create a new one-dimensional FFT plan.

Allocate and initialize a new one-dimensional FFT plan.

Args:
nx (int) – IN:

FFT length.

type (hipfftType_t) – IN:

FFT type.

batch (int) – IN:

Number of batched transforms to compute.

Returns:

A tuple of size 1 that contains (in that order):

hip.hipfft.hipfftPlan2d(int nx, int ny, type)#

Create a new two-dimensional FFT plan.

Allocate and initialize a new two-dimensional FFT plan. Two-dimensional data should be stored in C ordering (row-major format), so that indexes in y-direction (j index) vary the fastest.

Args:
nx (int) – IN:

Number of elements in the x-direction (slow index).

ny (int) – IN:

Number of elements in the y-direction (fast index).

type (hipfftType_t) – IN:

FFT type.

Returns:

A tuple of size 1 that contains (in that order):

hip.hipfft.hipfftPlan3d(int nx, int ny, int nz, type)#

Create a new three-dimensional FFT plan.

Allocate and initialize a new three-dimensional FFT plan. Three-dimensional data should be stored in C ordering (row-major format), so that indexes in z-direction (k index) vary the fastest.

Args:
nx (int) – IN:

Number of elements in the x-direction (slowest index).

ny (int) – IN:

Number of elements in the y-direction.

nz (int) – IN:

Number of elements in the z-direction (fastest index).

type (hipfftType_t) – IN:

FFT type.

Returns:

A tuple of size 1 that contains (in that order):

hip.hipfft.hipfftPlanMany(int rank, n, inembed, int istride, int idist, onembed, int ostride, int odist, type, int batch)#

Create a new batched rank-dimensional FFT plan with advanced data layout.

Allocate and initialize a new batched rank-dimensional FFT plan. The number of elements to transform in each direction of the input data is specified in n.

The batch parameter tells hipFFT how many transforms to perform. The distance between the first elements of two consecutive batches of the input and output data are specified with the idist and odist parameters.

The inembed and onembed parameters define the input and output data layouts. The number of elements in the data is assumed to be larger than the number of elements in the transform. Strided data layouts are also supported. Strides along the fastest direction in the input and output data are specified via the istride and ostride parameters.

If both inembed and onembed parameters are set to NULL, all the advanced data layout parameters are ignored and reverted to default values, i.e., the batched transform is performed with non-strided data access and the number of data/transform elements are assumed to be equivalent.

Args:
rank (int) – IN:

Dimension of transform (1, 2, or 3).

n (Pointer/object) – IN:

Number of elements to transform in the x/y/z directions.

inembed (Pointer/object) – IN:

Number of elements in the input data in the x/y/z directions.

istride (int) – IN:

Distance between two successive elements in the input data.

idist (int) – IN:

Distance between input batches.

onembed (Pointer/object) – IN:

Number of elements in the output data in the x/y/z directions.

ostride (int) – IN:

Distance between two successive elements in the output data.

odist (int) – IN:

Distance between output batches.

type (hipfftType_t) – IN:

FFT type.

batch (int) – IN:

Number of batched transforms to perform.

Returns:

A tuple of size 1 that contains (in that order):

hip.hipfft.hipfftCreate()#

Allocate a new plan.

Returns:

A tuple of size 1 that contains (in that order):

hip.hipfft.hipfftExtPlanScaleFactor(plan, double scalefactor)#

Set scaling factor.

hipFFT multiplies each element of the result by the given factor at the end of the transform.

The supplied factor must be a finite number. That is, it must neither be infinity nor NaN.

This function must be called after the plan is allocated using hipfftCreate, but before the plan is initialized by any of the “MakePlan” functions. Therefore, API functions that combine creation and initialization (hipfftPlan1d, hipfftPlan2d, hipfftPlan3d, and hipfftPlanMany) cannot set a scale factor.

Note that the scale factor applies to both forward and backward transforms executed with the specified plan handle.

Args:
plan (hipfftHandle_t/object):

(undocumented)

scalefactor (float/int):

(undocumented)

hip.hipfft.hipfftMakePlan1d(plan, int nx, type, int batch)#

Initialize a new one-dimensional FFT plan.

Assumes that the plan has been created already, and modifies the plan associated with the plan handle.

Args:
plan (hipfftHandle_t/object) – IN:

Handle of the FFT plan.

nx (int) – IN:

FFT length.

type (hipfftType_t) – IN:

FFT type.

batch (int) – IN:

Number of batched transforms to compute.

Returns:

A tuple of size 1 that contains (in that order):

  • int:

    Pointer to work area size (returned value).

hip.hipfft.hipfftMakePlan2d(plan, int nx, int ny, type)#

Initialize a new two-dimensional FFT plan.

Assumes that the plan has been created already, and modifies the plan associated with the plan handle. Two-dimensional data should be stored in C ordering (row-major format), so that indexes in y-direction (j index) vary the fastest.

Args:
plan (hipfftHandle_t/object) – IN:

Handle of the FFT plan.

nx (int) – IN:

Number of elements in the x-direction (slow index).

ny (int) – IN:

Number of elements in the y-direction (fast index).

type (hipfftType_t) – IN:

FFT type.

Returns:

A tuple of size 1 that contains (in that order):

  • int:

    Pointer to work area size (returned value).

hip.hipfft.hipfftMakePlan3d(plan, int nx, int ny, int nz, type)#

Initialize a new two-dimensional FFT plan.

Assumes that the plan has been created already, and modifies the plan associated with the plan handle. Three-dimensional data should be stored in C ordering (row-major format), so that indexes in z-direction (k index) vary the fastest.

Args:
plan (hipfftHandle_t/object) – IN:

Handle of the FFT plan.

nx (int) – IN:

Number of elements in the x-direction (slowest index).

ny (int) – IN:

Number of elements in the y-direction.

nz (int) – IN:

Number of elements in the z-direction (fastest index).

type (hipfftType_t) – IN:

FFT type.

Returns:

A tuple of size 1 that contains (in that order):

  • int:

    Pointer to work area size (returned value).

hip.hipfft.hipfftMakePlanMany(plan, int rank, n, inembed, int istride, int idist, onembed, int ostride, int odist, type, int batch)#

Initialize a new batched rank-dimensional FFT plan with advanced data layout.

Assumes that the plan has been created already, and modifies the plan associated with the plan handle. The number of elements to transform in each direction of the input data in the FFT plan is specified in n.

The batch parameter tells hipFFT how many transforms to perform. The distance between the first elements of two consecutive batches of the input and output data are specified with the idist and odist parameters.

The inembed and onembed parameters define the input and output data layouts. The number of elements in the data is assumed to be larger than the number of elements in the transform. Strided data layouts are also supported. Strides along the fastest direction in the input and output data are specified via the istride and ostride parameters.

If both inembed and onembed parameters are set to NULL, all the advanced data layout parameters are ignored and reverted to default values, i.e., the batched transform is performed with non-strided data access and the number of data/transform elements are assumed to be equivalent.

Args:
plan (hipfftHandle_t/object) – OUT:

Pointer to the FFT plan handle.

rank (int) – IN:

Dimension of transform (1, 2, or 3).

n (Pointer/object) – IN:

Number of elements to transform in the x/y/z directions.

inembed (Pointer/object) – IN:

Number of elements in the input data in the x/y/z directions.

istride (int) – IN:

Distance between two successive elements in the input data.

idist (int) – IN:

Distance between input batches.

onembed (Pointer/object) – IN:

Number of elements in the output data in the x/y/z directions.

ostride (int) – IN:

Distance between two successive elements in the output data.

odist (int) – IN:

Distance between output batches.

type (hipfftType_t) – IN:

FFT type.

batch (int) – IN:

Number of batched transforms to perform.

Returns:

A tuple of size 1 that contains (in that order):

  • int:

    Pointer to work area size (returned value).

hip.hipfft.hipfftMakePlanMany64(plan, int rank, n, inembed, long long istride, long long idist, onembed, long long ostride, long long odist, type, long long batch)#

(No short description, might be part of a group.)

Args:
plan (hipfftHandle_t/object):

(undocumented)

rank (int):

(undocumented)

n (Pointer/object):

(undocumented)

inembed (Pointer/object):

(undocumented)

istride (int):

(undocumented)

idist (int):

(undocumented)

onembed (Pointer/object):

(undocumented)

ostride (int):

(undocumented)

odist (int):

(undocumented)

type (hipfftType_t):

(undocumented)

batch (int):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

  • workSize (int):

    (undocumented)

hip.hipfft.hipfftEstimate1d(int nx, type, int batch)#

Return an estimate of the work area size required for a 1D plan.

Args:
nx (int) – IN:

Number of elements in the x-direction.

type (hipfftType_t) – IN:

FFT type.

batch (int) – IN:

Number of batched transforms to perform.

Returns:

A tuple of size 1 that contains (in that order):

  • int:

    Pointer to work area size (returned value).

hip.hipfft.hipfftEstimate2d(int nx, int ny, type)#

Return an estimate of the work area size required for a 2D plan.

Args:
nx (int) – IN:

Number of elements in the x-direction.

ny (int) – IN:

Number of elements in the y-direction.

type (hipfftType_t) – IN:

FFT type.

Returns:

A tuple of size 1 that contains (in that order):

  • int:

    Pointer to work area size (returned value).

hip.hipfft.hipfftEstimate3d(int nx, int ny, int nz, type)#

Return an estimate of the work area size required for a 3D plan.

Args:
nx (int) – IN:

Number of elements in the x-direction.

ny (int) – IN:

Number of elements in the y-direction.

nz (int) – IN:

Number of elements in the z-direction.

type (hipfftType_t) – IN:

FFT type.

Returns:

A tuple of size 1 that contains (in that order):

  • int:

    Pointer to work area size (returned value).

hip.hipfft.hipfftEstimateMany(int rank, n, inembed, int istride, int idist, onembed, int ostride, int odist, type, int batch)#

Return an estimate of the work area size required for a rank-dimensional plan.

Args:
rank (int) – IN:

Dimension of FFT transform (1, 2, or 3).

n (Pointer/object) – IN:

Number of elements in the x/y/z directions.

inembed (Pointer/object) – IN:

istride (int) – IN:

idist (int) – IN:

Distance between input batches.

onembed (Pointer/object) – IN:

ostride (int) – IN:

odist (int) – IN:

Distance between output batches.

type (hipfftType_t) – IN:

FFT type.

batch (int) – IN:

Number of batched transforms to perform.

Returns:

A tuple of size 1 that contains (in that order):

  • int:

    Pointer to work area size (returned value).

hip.hipfft.hipfftGetSize1d(plan, int nx, type, int batch)#

Return size of the work area size required for a 1D plan.

Args:
plan (hipfftHandle_t/object) – IN:

Pointer to the FFT plan.

nx (int) – IN:

Number of elements in the x-direction.

type (hipfftType_t) – IN:

FFT type.

batch (int) – IN:

Number of batched transforms to perform.

Returns:

A tuple of size 1 that contains (in that order):

  • int:

    Pointer to work area size (returned value).

hip.hipfft.hipfftGetSize2d(plan, int nx, int ny, type)#

Return size of the work area size required for a 2D plan.

Args:
plan (hipfftHandle_t/object) – IN:

Pointer to the FFT plan.

nx (int) – IN:

Number of elements in the x-direction.

ny (int) – IN:

Number of elements in the y-direction.

type (hipfftType_t) – IN:

FFT type.

Returns:

A tuple of size 1 that contains (in that order):

  • int:

    Pointer to work area size (returned value).

hip.hipfft.hipfftGetSize3d(plan, int nx, int ny, int nz, type)#

Return size of the work area size required for a 3D plan.

Args:
plan (hipfftHandle_t/object) – IN:

Pointer to the FFT plan.

nx (int) – IN:

Number of elements in the x-direction.

ny (int) – IN:

Number of elements in the y-direction.

nz (int) – IN:

Number of elements in the z-direction.

type (hipfftType_t) – IN:

FFT type.

Returns:

A tuple of size 1 that contains (in that order):

  • int:

    Pointer to work area size (returned value).

hip.hipfft.hipfftGetSizeMany(plan, int rank, n, inembed, int istride, int idist, onembed, int ostride, int odist, type, int batch)#

Return size of the work area size required for a rank-dimensional plan.

Args:
plan (hipfftHandle_t/object) – IN:

Pointer to the FFT plan.

rank (int) – IN:

Dimension of FFT transform (1, 2, or 3).

n (Pointer/object) – IN:

Number of elements in the x/y/z directions.

inembed (Pointer/object) – IN:

istride (int) – IN:

idist (int) – IN:

Distance between input batches.

onembed (Pointer/object) – IN:

ostride (int) – IN:

odist (int) – IN:

Distance between output batches.

type (hipfftType_t) – IN:

FFT type.

batch (int) – IN:

Number of batched transforms to perform.

Returns:

A tuple of size 1 that contains (in that order):

  • int:

    Pointer to work area size (returned value).

hip.hipfft.hipfftGetSizeMany64(plan, int rank, n, inembed, long long istride, long long idist, onembed, long long ostride, long long odist, type, long long batch)#

(No short description, might be part of a group.)

Args:
plan (hipfftHandle_t/object):

(undocumented)

rank (int):

(undocumented)

n (Pointer/object):

(undocumented)

inembed (Pointer/object):

(undocumented)

istride (int):

(undocumented)

idist (int):

(undocumented)

onembed (Pointer/object):

(undocumented)

ostride (int):

(undocumented)

odist (int):

(undocumented)

type (hipfftType_t):

(undocumented)

batch (int):

(undocumented)

Returns:

A tuple of size 1 that contains (in that order):

  • workSize (int):

    (undocumented)

hip.hipfft.hipfftGetSize(plan)#

Return size of the work area size required for a rank-dimensional plan.

Args:
plan (hipfftHandle_t/object) – IN:

Pointer to the FFT plan.

Returns:

A tuple of size 1 that contains (in that order):

  • int:

    Pointer to work area size (returned value).

hip.hipfft.hipfftSetAutoAllocation(plan, int autoAllocate)#

Set the plan’s auto-allocation flag. The plan will allocate its own workarea.

Args:
plan (hipfftHandle_t/object) – IN:

Pointer to the FFT plan.

autoAllocate (int) – IN:

0 to disable auto-allocation, non-zero to enable.

hip.hipfft.hipfftSetWorkArea(plan, workArea)#

Set the plan’s work area.

Args:
plan (hipfftHandle_t/object) – IN:

Pointer to the FFT plan.

workArea (Pointer/object) – IN:

Pointer to the work area (on device).

hip.hipfft.hipfftExecC2C(plan, idata, odata, int direction)#

Execute a (float) complex-to-complex FFT.

If the input and output buffers are equal, an in-place transform is performed.

Args:
plan (hipfftHandle_t/object):

The FFT plan.

idata (float2/object):

Input data (on device).

odata (float2/object):

Output data (on device).

direction (int):

Either HIPFFT_FORWARD or HIPFFT_BACKWARD.

hip.hipfft.hipfftExecR2C(plan, idata, odata)#

Execute a (float) real-to-complex FFT.

If the input and output buffers are equal, an in-place transform is performed.

Args:
plan (hipfftHandle_t/object):

The FFT plan.

idata (Pointer/object):

Input data (on device).

odata (float2/object):

Output data (on device).

hip.hipfft.hipfftExecC2R(plan, idata, odata)#

Execute a (float) complex-to-real FFT.

If the input and output buffers are equal, an in-place transform is performed.

Args:
plan (hipfftHandle_t/object):

The FFT plan.

idata (float2/object):

Input data (on device).

odata (Pointer/object):

Output data (on device).

hip.hipfft.hipfftExecZ2Z(plan, idata, odata, int direction)#

Execute a (double) complex-to-complex FFT.

If the input and output buffers are equal, an in-place transform is performed.

Args:
plan (hipfftHandle_t/object):

The FFT plan.

idata (double2/object):

Input data (on device).

odata (double2/object):

Output data (on device).

direction (int):

Either HIPFFT_FORWARD or HIPFFT_BACKWARD.

hip.hipfft.hipfftExecD2Z(plan, idata, odata)#

Execute a (double) real-to-complex FFT.

If the input and output buffers are equal, an in-place transform is performed.

Args:
plan (hipfftHandle_t/object):

The FFT plan.

idata (Pointer/object):

Input data (on device).

odata (double2/object):

Output data (on device).

hip.hipfft.hipfftExecZ2D(plan, idata, odata)#

Execute a (double) complex-to-real FFT.

If the input and output buffers are equal, an in-place transform is performed.

Args:
plan (hipfftHandle_t/object):

The FFT plan.

idata (double2/object):

Input data (on device).

odata (Pointer/object):

Output data (on device).

hip.hipfft.hipfftSetStream(plan, stream)#

Set HIP stream to execute plan on.

Associates a HIP stream with a hipFFT plan. All kernels launched by this plan are associated with the provided stream.

Args:
plan (hipfftHandle_t/object):

The FFT plan.

stream (ihipStream_t/object):

The HIP stream.

hip.hipfft.hipfftDestroy(plan)#

Destroy and deallocate an existing plan.

Args:
plan (hipfftHandle_t/object):

(undocumented)

hip.hipfft.hipfftGetVersion(version)#

Get rocFFT/cuFFT version.

Args:
version (Pointer/object) – OUT:

cuFFT/rocFFT version (returned value).

hip.hipfft.hipfftGetProperty(type, value)#

Get library property.

Args:
type (hipfftLibraryPropertyType_t) – IN:

Property type.

value (Pointer/object) – OUT:

Returned value.