InAccel Coral Python API
import inaccel.coral as inaccel
def array(object, dtype=None, order='K', ndmin=0)
Create an array.
- An array, any object exposing the array interface, an object whose array method returns an array, or any (nested) sequence.
- The desired data-type for the array. If not given, then the type will be determined as the minimum type required to hold the objects in the sequence.
- Specify the memory layout of the array. If object is not an array, the
newly created array will be in C order (row major) unless ‘F’ is
specified, in which case it will be in Fortran order (column major). If
object is an array the following holds.
‘K’ F & C order preserved, otherwise most similar order ‘A’ F order if input is F and not C, otherwise C order ‘C’ C order ‘F’ F order
- Specifies the minimum number of dimensions that the resulting array should have. Ones will be pre-pended to the shape as needed to meet this requirement.
- An array object satisfying the specified requirements.
Schedules the request, accelerator, to be executed as accelerator(args…) and returns a session object representing the execution of the request.
- The accelerator request to submit
Wait for the session instance given by accelerator to complete.
- The accelerator session to wait
class ndarray (...)
An array object represents a multidimensional, homogeneous array of fixed-size items. An associated data-type object describes the format of each element in the array (its byte-order, how many bytes it occupies in memory, whether it is an integer, a floating point number, or something else, etc.)
Arrays should be constructed using
array(). For more information, refer to the numpy module and examine the methods and attributes of an array.
class request (id)
A high-level class to represent accelerated functions.
This class provides an intermediate representation of an accelerator request to Coral FPGA resource manager. You should use this class to form an acceleration request which you will later submit to InAccel Coral. Your interaction with this class should ideally be limited to declaring the accelerator id you wish to execute and populating this function with arguments.
def arg(self, value, index=None)
Used to set the argument value for a specific argument of an accelerator.
- Data that should be used as the argument value for argument specified by index. If index is not specified, the value is appended to the end of the argument list.
- The argument index. Arguments to the accelerator are referred by indices that go from 0 for the leftmost argument to n - 1, where n is the total number of arguments declared by an accelerator.
- This object
Encapsulates the asynchronous execution of an accelerator request.
sessioninstances are created by
submit()and should not be created directly.