rocAL Python API overview#
The rocAL Python package has been created using Pybind11 which enables data transfer between the rocAL C++ API and Python API.
The rocal_pybind package includes both PyTorch and TensorFlow framework support and support for multiple data readers such as FileReader, COCOReader, and TFRecordReader.
The rocAL data types are defined in amd.rocal.types.
amd.rocal.fnContains the image augmentations linked to the rocAL C++ API.
amd.rocal.decodersImage, video, and audio decoders.
amd.rocal.readersImage, video, and audio readers.
amd.rocal.pipelineThe pipeline class encapsulates the data needed to build and run a rocAL graph. This includes support for context and graph creation, functions to verify and run the graph, and data transfer functions.
amd.rocal.typesenums exported from the C++ API to Python.
amd.rocal.plugin.pytorchPyTorch plugin that includes the
ROCALGenericIteratorfor Pytorch. TheROCALClassificationIteratorclass implements an iterator for image classification that returns labelled images.amd.rocal.plugin.tfTensorFlow plugin that includes the
readers.tfrecordTensorFlow reader.amd.rocal.plugin.jaxJAX plugin that includes the
ROCALJaxIteratorfor JAX. TheROCALJaxIteratorimplements an iterator for running a pipeline over multiple devices.