Batch API

Batch API#

ROCprofiler-SDK developer API: Batch API
ROCprofiler-SDK developer API 1.4.1
ROCm Profiling API and tools

Data Structures

struct  hipFileIOParams_t
 Input parameters for a batch IO request. More...
 
struct  hipFileIOEvents_t
 Status of a batch IO operation. More...
 

Typedefs

typedef void * hipFileBatchHandle_t
 Opaque batch operations handle.
 

Enumerations

enum  hipFileOpcode_t {
  hipFileBatchRead = 0 ,
  hipFileBatchWrite = 1
}
 The direction of data movement in a batch IO request. More...
 
enum  hipFileStatus_t {
  hipFileWaiting = 1 << 0 ,
  hipFilePending = 1 << 1 ,
  hipFileInvalid = 1 << 2 ,
  hipFileCanceled = 1 << 3 ,
  hipFileComplete = 1 << 4 ,
  hipFileTimeout = 1 << 5 ,
  hipFileFailed = 1 << 6
}
 The status of a batch IO operation. More...
 
enum  hipFileBatchMode_t { hipFileBatch = 1 }
 Mode of a batch IO operation. More...
 

Functions

hipFileError_t hipFileBatchIOSetUp (hipFileBatchHandle_t *batch_idp, unsigned max_nr)
 Prepare the system to perform a batch IO operation.
 
hipFileError_t hipFileBatchIOSubmit (hipFileBatchHandle_t batch_idp, unsigned nr, hipFileIOParams_t *iocbp, unsigned flags)
 Enqueue a batch of IO requests for the GPU to complete asynchronously.
 
hipFileError_t hipFileBatchIOGetStatus (hipFileBatchHandle_t batch_idp, unsigned min_nr, unsigned *nr, hipFileIOEvents_t *iocbp, struct timespec *timeout)
 Poll for the status of completed batch IO operations.
 
hipFileError_t hipFileBatchIOCancel (hipFileBatchHandle_t batch_idp)
 Cancels all pending batch IO operations.
 
void hipFileBatchIODestroy (hipFileBatchHandle_t batch_idp)
 Destroys the batch IO handle and frees the associated resources.
 

Detailed Description


Data Structure Documentation

◆ hipFileIOParams_t

struct hipFileIOParams_t

Input parameters for a batch IO request.

Definition at line 704 of file hipfile.h.

+ Collaboration diagram for hipFileIOParams_t:
Data Fields
void * cookie Optionally used to track IO operations (e.g. self-reference pointer)
hipFileHandle_t fh Registered hipFile handle for the target file.
hipFileBatchMode_t mode Mode of the batch IO request.
hipFileOpcode_t opcode Direction data is moving for the batch request.
union hipFileIOParams_t.u u Wrapping union for batch IO parameters.

◆ hipFileIOEvents_t

struct hipFileIOEvents_t

Status of a batch IO operation.

Definition at line 723 of file hipfile.h.

+ Collaboration diagram for hipFileIOEvents_t:
Data Fields
void * cookie Optionally used to track IO operations (e.g. pointer to corresponding hipFileIOParams)
unsigned long ret Number of bytes transferred or POSIX error code if negative.
hipFileStatus_t status Status of the batch IO operation.

Typedef Documentation

◆ hipFileBatchHandle_t

typedef void* hipFileBatchHandle_t

#include <rocprofiler-sdk/hipfile/details/hipfile.h>

Opaque batch operations handle.

Definition at line 733 of file hipfile.h.

Enumeration Type Documentation

◆ hipFileBatchMode_t

#include <rocprofiler-sdk/hipfile/details/hipfile.h>

Mode of a batch IO operation.

Enumerator
hipFileBatch 

Normal batch IO operation.

Definition at line 696 of file hipfile.h.

696 {
697 hipFileBatch = 1, //!< Normal batch IO operation
hipFileBatchMode_t
Mode of a batch IO operation.
Definition hipfile.h:696
@ hipFileBatch
Normal batch IO operation.
Definition hipfile.h:697

◆ hipFileOpcode_t

#include <rocprofiler-sdk/hipfile/details/hipfile.h>

The direction of data movement in a batch IO request.

Enumerator
hipFileBatchRead 

Read batch IO operation.

hipFileBatchWrite 

Write batch IO operation.

Definition at line 673 of file hipfile.h.

673 {
674 hipFileBatchRead = 0, //!< Read batch IO operation
675 hipFileBatchWrite = 1, //!< Write batch IO operation
hipFileOpcode_t
The direction of data movement in a batch IO request.
Definition hipfile.h:673
@ hipFileBatchRead
Read batch IO operation.
Definition hipfile.h:674
@ hipFileBatchWrite
Write batch IO operation.
Definition hipfile.h:675

◆ hipFileStatus_t

#include <rocprofiler-sdk/hipfile/details/hipfile.h>

The status of a batch IO operation.

Enumerator
hipFileWaiting 

Batch IO operation pending acceptance.

hipFilePending 

Batch IO operation accepted and queued.

hipFileInvalid 

Batch IO operation was rejected for being invalid or could not be queued.

hipFileCanceled 

Batch IO operation was canceled.

hipFileComplete 

Batch IO operation completed.

hipFileTimeout 

Batch IO operation timed out.

hipFileFailed 

Batch IO operation failed.

Definition at line 682 of file hipfile.h.

682 {
683 hipFileWaiting = 1 << 0, //!< Batch IO operation pending acceptance
684 hipFilePending = 1 << 1, //!< Batch IO operation accepted and queued
685 hipFileInvalid = 1 << 2, //!< Batch IO operation was rejected for being invalid or could not be queued
686 hipFileCanceled = 1 << 3, //!< Batch IO operation was canceled
687 hipFileComplete = 1 << 4, //!< Batch IO operation completed
688 hipFileTimeout = 1 << 5, //!< Batch IO operation timed out
689 hipFileFailed = 1 << 6, //!< Batch IO operation failed
hipFileStatus_t
The status of a batch IO operation.
Definition hipfile.h:682
@ hipFileTimeout
Batch IO operation timed out.
Definition hipfile.h:688
@ hipFilePending
Batch IO operation accepted and queued.
Definition hipfile.h:684
@ hipFileFailed
Batch IO operation failed.
Definition hipfile.h:689
@ hipFileInvalid
Batch IO operation was rejected for being invalid or could not be queued.
Definition hipfile.h:685
@ hipFileCanceled
Batch IO operation was canceled.
Definition hipfile.h:686
@ hipFileWaiting
Batch IO operation pending acceptance.
Definition hipfile.h:683
@ hipFileComplete
Batch IO operation completed.
Definition hipfile.h:687

Function Documentation

◆ hipFileBatchIOCancel()

hipFileError_t hipFileBatchIOCancel ( hipFileBatchHandle_t  batch_idp)

#include <rocprofiler-sdk/hipfile/details/hipfile.h>

Cancels all pending batch IO operations.

\warn_not_implemented

Parameters
[in]batch_idp\batch_handle_param
Returns
\hipfile_error_return

◆ hipFileBatchIODestroy()

void hipFileBatchIODestroy ( hipFileBatchHandle_t  batch_idp)

#include <rocprofiler-sdk/hipfile/details/hipfile.h>

Destroys the batch IO handle and frees the associated resources.

\warn_not_implemented_void

Parameters
[in]batch_idp\batch_handle_param

◆ hipFileBatchIOGetStatus()

hipFileError_t hipFileBatchIOGetStatus ( hipFileBatchHandle_t  batch_idp,
unsigned  min_nr,
unsigned *  nr,
hipFileIOEvents_t *  iocbp,
struct timespec *  timeout 
)

#include <rocprofiler-sdk/hipfile/details/hipfile.h>

Poll for the status of completed batch IO operations.

\warn_not_implemented

Parameters
[in]batch_idp\batch_handle_param
[in]min_nrMinimum number of batch operation statuses that should be returned. If timeout is exceeded, fewer statuses may be returned.
[in,out]nrMaximum number of batch operation statuses that can be returned. This is parameter is modified to return the number of statuses returned in iocbp.
[out]iocbpAn array containing up to nr statuses from the overall batch operation
[in]timeoutMaximum amount of time this function should poll for status updates
Returns
\hipfile_error_return

◆ hipFileBatchIOSetUp()

hipFileError_t hipFileBatchIOSetUp ( hipFileBatchHandle_t *  batch_idp,
unsigned  max_nr 
)

#include <rocprofiler-sdk/hipfile/details/hipfile.h>

Prepare the system to perform a batch IO operation.

Parameters
[out]batch_idp\batch_handle_param
[in]max_nrMaximum number of requests that can be submitted to this batch handle
Returns
\hipfile_error_return

◆ hipFileBatchIOSubmit()

hipFileError_t hipFileBatchIOSubmit ( hipFileBatchHandle_t  batch_idp,
unsigned  nr,
hipFileIOParams_t *  iocbp,
unsigned  flags 
)

#include <rocprofiler-sdk/hipfile/details/hipfile.h>

Enqueue a batch of IO requests for the GPU to complete asynchronously.

Parameters
[in]batch_idp\batch_handle_param
[in]nrNumber of batch IO requests to submit
[in]iocbpAn array of nr batch IO requests to submit to the GPU. Data will be read into or written from the buffer specified in each request.
[in]flagsControl Flags for the batch IO. Currently unused.
Returns
\hipfile_error_return