GPU IO Driver API

GPU IO Driver API#

ROCprofiler-SDK developer API: GPU IO Driver API
ROCprofiler-SDK developer API 1.4.1
ROCm Profiling API and tools
GPU IO Driver API

Data Structures

struct  hipFileDriverProps_t
 GPU IO configuration. More...
 
struct  hipFileDriverProps_t.nvfs
 GPU IO Driver Configuration. More...
 

Enumerations

enum  hipFileDriverStatusFlags_t {
  hipFileLustreSupported = 0 ,
  hipFileWekaFSSupported = 1 ,
  hipFileNFSSupported = 2 ,
  hipFileGPFSSupported = 3 ,
  hipFileNVMeSupported = 4 ,
  hipFileNVMeoFSupported = 5 ,
  hipFileSCSISupported = 6 ,
  hipFileScaleFluxCSDSupported = 7 ,
  hipFileNVMeshSupported = 8 ,
  hipFileBeeGFSSupported = 9 ,
  hipFileNVMeP2PSupported = 11 ,
  hipFileScatefsSupported = 12
}
 Filesystems/storage protocols supported by GPU IO on this system. More...
 
enum  hipFileDriverControlFlags_t {
  hipFileUsePollMode = 0 ,
  hipFileAllowCompatMode = 1
}
 Control flags for passing to the GPU IO driver. More...
 
enum  hipFileFeatureFlags_t {
  hipFileDynRoutingSupported = 0 ,
  hipFileBatchIOSupported = 1 ,
  hipFileStreamsSupported = 2 ,
  hipFileParallelIOSupported = 3
}
 GPU IO Transport & Features supported by the system. More...
 

Functions

hipFileError_t hipFileDriverOpen (void)
 Initialize the GPU IO driver for this process.
 
hipFileError_t hipFileDriverClose (void)
 Close the GPU IO driver for this process.
 
int64_t hipFileUseCount (void)
 Obtain the current reference count for the library.
 
hipFileError_t hipFileDriverGetProperties (hipFileDriverProps_t *props)
 Get a list of GPU IO driver properties.
 
hipFileError_t hipFileDriverSetPollMode (bool poll, unsigned long poll_threshold_size)
 Enable/disable polling mode for GPU IO.
 
hipFileError_t hipFileDriverSetMaxDirectIOSize (unsigned long max_direct_io_size)
 Set the maximum IO chunk size.
 
hipFileError_t hipFileDriverSetMaxCacheSize (unsigned long max_cache_size)
 Set the maximum amount of GPU memory that can be used for bounce buffers.
 
hipFileError_t hipFileDriverSetMaxPinnedMemSize (unsigned long max_pinned_size)
 Set the maximum amount of GPU memory that can be pinned.
 

Detailed Description


Data Structure Documentation

◆ hipFileDriverProps_t

struct hipFileDriverProps_t

GPU IO configuration.

Definition at line 334 of file hipfile.h.

+ Collaboration diagram for hipFileDriverProps_t:
Data Fields
unsigned feature_flags Bitfield that maps to hipFileFeatureFlags_t.
unsigned max_batch_io_count Maximum number of batch operations that can be submitted at once.
unsigned max_batch_io_timeout_msecs Timeout (in msec) for a batch operation to complete.
uint64_t max_device_cache_size Maximum amount of GPU memory (in KiB) that can be used for bounce buffers.
uint64_t max_device_pinned_mem_size Maximum amount of GPU memory (in KiB) that can be pinned.
struct hipFileDriverProps_t.nvfs nvfs GPU IO Driver Configuration.
uint64_t per_buffer_cache_size Amount of GPU memory (in KiB) allocated for each bounce buffer.

◆ hipFileDriverProps_t.nvfs

struct hipFileDriverProps_t.nvfs

GPU IO Driver Configuration.

Definition at line 338 of file hipfile.h.

+ Collaboration diagram for hipFileDriverProps_t.nvfs:
Data Fields
unsigned driver_control_flags Bitfield that maps to hipFileDriverControlFlags_t.
unsigned driver_status_flags Bitfield that maps to hipFileDriverStatusFlags_t.
unsigned major_version Major version of the GPU IO driver.
uint64_t max_direct_io_size Maximum IO size (in KiB) used by the GPU IO driver.
unsigned minor_version Minor version of the GPU IO driver.
uint64_t poll_thresh_size Maximum IO size (in KiB) for which polling is used when poll mode is enabled.

Enumeration Type Documentation

◆ hipFileDriverControlFlags_t

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

Control flags for passing to the GPU IO driver.

Enumerator
hipFileUsePollMode 

Enable polling for IO completion.

hipFileAllowCompatMode 

Allow GPU IO to fall back to POSIX IO.

Definition at line 314 of file hipfile.h.

314 {
315 hipFileUsePollMode = 0, //!< Enable polling for IO completion
316 hipFileAllowCompatMode = 1, //!< Allow GPU IO to fall back to POSIX IO
hipFileDriverControlFlags_t
Control flags for passing to the GPU IO driver.
Definition hipfile.h:314
@ hipFileUsePollMode
Enable polling for IO completion.
Definition hipfile.h:315
@ hipFileAllowCompatMode
Allow GPU IO to fall back to POSIX IO.
Definition hipfile.h:316

◆ hipFileDriverStatusFlags_t

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

Filesystems/storage protocols supported by GPU IO on this system.

Note
Value 10 is reserved for YRCloudFile
Enumerator
hipFileLustreSupported 

Lustre is supported.

hipFileWekaFSSupported 

Weka is supported.

hipFileNFSSupported 

NFS is supported.

hipFileGPFSSupported 

GPFS/IBM Storage Scale is supported.

hipFileNVMeSupported 

Local NVMe is supported.

hipFileNVMeoFSupported 

NVMeoF is supported.

hipFileSCSISupported 

SCSI is supported.

hipFileScaleFluxCSDSupported 

ScaleFlux CSD is supported.

hipFileNVMeshSupported 

NVMesh is supported.

hipFileBeeGFSSupported 

BeeGFS is supported.

hipFileNVMeP2PSupported 

NVMeP2P is supported.

hipFileScatefsSupported 

ScateFS is supported.

Definition at line 294 of file hipfile.h.

294 {
295 hipFileLustreSupported = 0, //!< Lustre is supported
296 hipFileWekaFSSupported = 1, //!< Weka is supported
297 hipFileNFSSupported = 2, //!< NFS is supported
298 hipFileGPFSSupported = 3, //!< GPFS/IBM Storage Scale is supported
299 hipFileNVMeSupported = 4, //!< Local NVMe is supported
300 hipFileNVMeoFSupported = 5, //!< NVMeoF is supported
301 hipFileSCSISupported = 6, //!< SCSI is supported
302 hipFileScaleFluxCSDSupported = 7, //!< ScaleFlux CSD is supported
303 hipFileNVMeshSupported = 8, //!< NVMesh is supported
304 hipFileBeeGFSSupported = 9, //!< BeeGFS is supported
305 /* 10 is reserved for YRCloudFile */
306 hipFileNVMeP2PSupported = 11, //!< NVMeP2P is supported
307 hipFileScatefsSupported = 12, //!< ScateFS is supported
hipFileDriverStatusFlags_t
Filesystems/storage protocols supported by GPU IO on this system.
Definition hipfile.h:294
@ hipFileScatefsSupported
ScateFS is supported.
Definition hipfile.h:307
@ hipFileNVMeSupported
Local NVMe is supported.
Definition hipfile.h:299
@ hipFileNVMeshSupported
NVMesh is supported.
Definition hipfile.h:303
@ hipFileGPFSSupported
GPFS/IBM Storage Scale is supported.
Definition hipfile.h:298
@ hipFileScaleFluxCSDSupported
ScaleFlux CSD is supported.
Definition hipfile.h:302
@ hipFileNFSSupported
NFS is supported.
Definition hipfile.h:297
@ hipFileLustreSupported
Lustre is supported.
Definition hipfile.h:295
@ hipFileNVMeoFSupported
NVMeoF is supported.
Definition hipfile.h:300
@ hipFileWekaFSSupported
Weka is supported.
Definition hipfile.h:296
@ hipFileSCSISupported
SCSI is supported.
Definition hipfile.h:301
@ hipFileBeeGFSSupported
BeeGFS is supported.
Definition hipfile.h:304
@ hipFileNVMeP2PSupported
NVMeP2P is supported.
Definition hipfile.h:306

◆ hipFileFeatureFlags_t

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

GPU IO Transport & Features supported by the system.

Enumerator
hipFileDynRoutingSupported 

RDMA dynamic routing is supported.

hipFileBatchIOSupported 

Batch operations are supported.

hipFileStreamsSupported 

Streams are supported.

hipFileParallelIOSupported 

Parallel IO is supported.

Definition at line 323 of file hipfile.h.

323 {
324 hipFileDynRoutingSupported = 0, //!< RDMA dynamic routing is supported
325 hipFileBatchIOSupported = 1, //!< Batch operations are supported
326 hipFileStreamsSupported = 2, //!< Streams are supported
327 hipFileParallelIOSupported = 3, //!< Parallel IO is supported
hipFileFeatureFlags_t
GPU IO Transport & Features supported by the system.
Definition hipfile.h:323
@ hipFileBatchIOSupported
Batch operations are supported.
Definition hipfile.h:325
@ hipFileParallelIOSupported
Parallel IO is supported.
Definition hipfile.h:327
@ hipFileDynRoutingSupported
RDMA dynamic routing is supported.
Definition hipfile.h:324
@ hipFileStreamsSupported
Streams are supported.
Definition hipfile.h:326

Function Documentation

◆ hipFileDriverClose()

hipFileError_t hipFileDriverClose ( void  )

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

Close the GPU IO driver for this process.

Each call to hipFileDriverClose() decrements the library's reference count. If a call to hipFileDriverClose() results in the reference count transitioning from one to zero, the library's state will be destroyed.

Explicitly closing the library is not required; the library's state will be destroyed automatically at program exit.

Returns
\hipfile_error_return

◆ hipFileDriverGetProperties()

hipFileError_t hipFileDriverGetProperties ( hipFileDriverProps_t *  props)

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

Get a list of GPU IO driver properties.

\warn_not_implemented

Parameters
[out]propsSee hipFileDriverProps_t for what properties are reported
Returns
\hipfile_error_return

◆ hipFileDriverOpen()

hipFileError_t hipFileDriverOpen ( void  )

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

Initialize the GPU IO driver for this process.

Each call to hipFileDriverOpen() increments the library's reference count. If a call to hipFileDriverOpen() results in the reference count transitioning from zero to one, the library's state will be initialized.

Calling hipFileDriverOpen() is optional. The first call to hipFileBufRegister() or hipFileHandleRegister() will trigger library initialization and increment the library's reference count.

Returns
\hipfile_error_return

◆ hipFileDriverSetMaxCacheSize()

hipFileError_t hipFileDriverSetMaxCacheSize ( unsigned long  max_cache_size)

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

Set the maximum amount of GPU memory that can be used for bounce buffers.

\warn_not_implemented

Parameters
[in]max_cache_sizeMaximum GPU memory (in KiB) that can be reserved for bounce buffers
Returns
\hipfile_error_return

◆ hipFileDriverSetMaxDirectIOSize()

hipFileError_t hipFileDriverSetMaxDirectIOSize ( unsigned long  max_direct_io_size)

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

Set the maximum IO chunk size.

\warn_not_implemented

Parameters
[in]max_direct_io_sizeMaximum IO chunk size (in KiB) for each IO request
Returns
\hipfile_error_return

◆ hipFileDriverSetMaxPinnedMemSize()

hipFileError_t hipFileDriverSetMaxPinnedMemSize ( unsigned long  max_pinned_size)

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

Set the maximum amount of GPU memory that can be pinned.

\warn_not_implemented

Parameters
[in]max_pinned_sizeMaximum GPU memory (in KiB) that can be pinned
Returns
\hipfile_error_return

◆ hipFileDriverSetPollMode()

hipFileError_t hipFileDriverSetPollMode ( bool  poll,
unsigned long  poll_threshold_size 
)

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

Enable/disable polling mode for GPU IO.

\warn_not_implemented

Parameters
[in]polltrue to enable polling, false to disable
[in]poll_threshold_sizeMaximum IO size (in KiB) for which polling is used when enabled
Returns
\hipfile_error_return

◆ hipFileUseCount()

int64_t hipFileUseCount ( void  )

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

Obtain the current reference count for the library.

See also
hipFileDriverOpen()
hipFileDriverClose()
Returns
The library's reference count