AMD rocAL API#
The AMD rocAL is designed to efficiently decode and process images and videos from a variety of storage formats and modify them through a processing graph programmable by the user. More...
Functions | |
| RocalContext ROCAL_API_CALL | rocalCreate (size_t batch_size, RocalProcessMode affinity, int gpu_id=0, size_t cpu_thread_count=1, size_t prefetch_queue_depth=3, RocalTensorOutputType output_tensor_data_type=RocalTensorOutputType::ROCAL_FP32) |
| rocalCreate creates the context for a new augmentation pipeline. Initializes all the required internals for the pipeline More... | |
| RocalStatus ROCAL_API_CALL | rocalVerify (RocalContext context) |
| rocalVerify function to verify the graph for all the inputs and outputs More... | |
| RocalStatus ROCAL_API_CALL | rocalRun (RocalContext context) |
| rocalRun function to process and run the built and verified graph. More... | |
| RocalStatus ROCAL_API_CALL | rocalRelease (RocalContext rocal_context) |
| rocalRelease function to free all the resources allocated during the graph creation process. More... | |
| RocalStatus ROCAL_API_CALL | rocalSerialize (RocalContext rocal_context, size_t *serialized_string_size) |
| Serialize the current pipeline into an opaque binary string. More... | |
| RocalStatus ROCAL_API_CALL | rocalGetSerializedString (RocalContext rocal_context, char *serialized_string) |
| Copy the last serialized pipeline string into a user buffer. More... | |
Detailed Description
The AMD rocAL is designed to efficiently decode and process images and videos from a variety of storage formats and modify them through a processing graph programmable by the user.
Function Documentation
◆ rocalCreate()
| RocalContext ROCAL_API_CALL rocalCreate | ( | size_t | batch_size, |
| RocalProcessMode | affinity, | ||
| int | gpu_id = 0, |
||
| size_t | cpu_thread_count = 1, |
||
| size_t | prefetch_queue_depth = 3, |
||
| RocalTensorOutputType | output_tensor_data_type = RocalTensorOutputType::ROCAL_FP32 |
||
| ) |
rocalCreate creates the context for a new augmentation pipeline. Initializes all the required internals for the pipeline
- Parameters
-
[in] batch_size batch size [in] affinity RocalProcessMode: Defines whether rocal data loading should be on the CPU or GPU. [in] gpu_id GPU id [in] cpu_thread_count number of cpu threads [in] prefetch_queue_depth The depth of the prefetch queue. [in] output_tensor_data_type RocalTensorOutputType: Defines whether the output of rocal tensor is FP32 or FP16.
- Returns
- A RocalContext - The context for the pipeline
◆ rocalGetSerializedString()
| RocalStatus ROCAL_API_CALL rocalGetSerializedString | ( | RocalContext | rocal_context, |
| char * | serialized_string | ||
| ) |
Copy the last serialized pipeline string into a user buffer.
This API copies the serialized pipeline string produced by rocalSerialize() into the user-provided buffer. The buffer must be pre-allocated with size at least serialized_string_size + 1 bytes to accommodate the null terminator.
- Warning
- The caller is responsible for ensuring the destination buffer has sufficient capacity (at least serialized_string_size + 1 bytes as returned by rocalSerialize). Passing an insufficiently sized buffer will result in buffer overflow and undefined behavior.
- Parameters
-
[in] rocal_context the rocAL context [out] serialized_string destination buffer to receive the serialized string (null-terminated). Must be pre-allocated with at least serialized_string_size + 1 bytes.
- Returns
- A RocalStatus - A status code indicating the success or failure.
◆ rocalRelease()
| RocalStatus ROCAL_API_CALL rocalRelease | ( | RocalContext | rocal_context | ) |
rocalRelease function to free all the resources allocated during the graph creation process.
- Parameters
-
[in] context the rocal context
- Returns
- A RocalStatus - A status code indicating the success or failure.
◆ rocalRun()
| RocalStatus ROCAL_API_CALL rocalRun | ( | RocalContext | context | ) |
rocalRun function to process and run the built and verified graph.
- Parameters
-
[in] context the rocal context
- Returns
- A RocalStatus - A status code indicating the success or failure
◆ rocalSerialize()
| RocalStatus ROCAL_API_CALL rocalSerialize | ( | RocalContext | rocal_context, |
| size_t * | serialized_string_size | ||
| ) |
Serialize the current pipeline into an opaque binary string.
- Parameters
-
[in] rocal_context the rocAL context [out] serialized_string_size number of bytes in the serialized string
- Returns
- A RocalStatus - A status code indicating the success or failure.
◆ rocalVerify()
| RocalStatus ROCAL_API_CALL rocalVerify | ( | RocalContext | context | ) |
rocalVerify function to verify the graph for all the inputs and outputs
- Parameters
-
[in] context the rocal context
- Returns
- A RocalStatus - A status code indicating the success or failure