rocprofiler-sdk/hipfile/details/hipfile.h Source File#
|
ROCprofiler-SDK developer API 1.3.5
ROCm Profiling API and tools
|
hipfile.h
Go to the documentation of this file.
140 hipFileDriverUnsupportedLimit = HIPFILE_BASE_ERR + 3, //!< GPU IO Driver property value is unsupported
141 hipFileDriverVersionMismatch = HIPFILE_BASE_ERR + 4, //!< hipFile version does not match GPU IO driver version
142 hipFileDriverVersionReadError = HIPFILE_BASE_ERR + 5, //!< Unable to read the GPU IO driver version
143 hipFileDriverClosing = HIPFILE_BASE_ERR + 6, //!< GPU IO driver is closing and not accepting new requests
144 hipFilePlatformNotSupported = HIPFILE_BASE_ERR + 7, //!< hipFile is not supported on the current platform
145 hipFileIONotSupported = HIPFILE_BASE_ERR + 8, //!< hipFile is not supported on the selected file
146 hipFileDeviceNotSupported = HIPFILE_BASE_ERR + 9, //!< The selected GPU does not support hipFile
148 hipFileHipDriverError = HIPFILE_BASE_ERR + 11, //!< GPU driver error: Inspect the hipError_t value for additional information
150 hipFileHipMemoryTypeInvalid = HIPFILE_BASE_ERR + 13, //!< Memory type backing pointer is incompatible with hipFile
151 hipFileHipPointerRangeError = HIPFILE_BASE_ERR + 14, //!< Pointer range exceeds allocated memory region
153 hipFileInvalidMappingSize = HIPFILE_BASE_ERR + 16, //!< Accessing memory beyond pinned memory buffer
154 hipFileInvalidMappingRange = HIPFILE_BASE_ERR + 17, //!< Accessing memory beyond mapped memory region
160 hipFileMemoryAlreadyRegistered = HIPFILE_BASE_ERR + 23, //!< Device pointer is already registered
164 hipFileHandleNotRegistered = HIPFILE_BASE_ERR + 27, //!< File handle for GPU IO is not registered
165 hipFileHandleAlreadyRegistered = HIPFILE_BASE_ERR + 28, //!< File handle for GPU IO is already registered
171 hipFileIODisabled = HIPFILE_BASE_ERR + 34, //!< GPU IO config file prohibits GPU IO on specified file
172 hipFileBatchSubmitFailed = HIPFILE_BASE_ERR + 35, //!< Failed to submit request for batch operation
173 hipFileGPUMemoryPinningFailed = HIPFILE_BASE_ERR + 36, //!< Failed to allocated pinned device memory
176 hipFileIOMaxError = HIPFILE_BASE_ERR + 39, //!< Internal flag to mark largest hipFile error code
342 uint64_t poll_thresh_size; //!< Maximum IO size (in KiB) for which polling is used when poll mode is
348 } nvfs;
352 uint64_t max_device_cache_size; //!< Maximum amount of GPU memory (in KiB) that can be used for bounce
354 uint64_t per_buffer_cache_size; //!< Amount of GPU memory (in KiB) allocated for each bounce buffer
355 uint64_t max_device_pinned_mem_size; //!< Maximum amount of GPU memory (in KiB) that can be pinned
357 unsigned max_batch_io_count; //!< Maximum number of batch operations that can be submitted at once
546ssize_t hipFileWrite(hipFileHandle_t fh, const void *buffer_base, size_t size, hoff_t file_offset,
645 * @param [in] max_cache_size Maximum GPU memory (in KiB) that can be reserved for bounce buffers
685 hipFileInvalid = 1 << 2, //!< Batch IO operation was rejected for being invalid or could not be queued
761hipFileError_t hipFileBatchIOSubmit(hipFileBatchHandle_t batch_idp, unsigned nr, hipFileIOParams_t *iocbp,
782hipFileError_t hipFileBatchIOGetStatus(hipFileBatchHandle_t batch_idp, unsigned min_nr, unsigned *nr,
854hipFileError_t hipFileReadAsync(hipFileHandle_t fh, void *buffer_base, size_t *size_p, hoff_t *file_offset_p,
874hipFileError_t hipFileWriteAsync(hipFileHandle_t fh, void *buffer_base, size_t *size_p, hoff_t *file_offset_p,
984 * @note If the driver is closed, the value returned is the value that was last set by hipFileSetParameter*.
1001 * @note If the driver is closed, the value returned is the value that was last set by hipFileSetParameter*.
1019 * @note If the driver is closed, the value returned is the value that was last set by hipFileSetParameter*.
1022hipFileError_t hipFileGetParameterString(hipFileStringConfigParameter_t param, char *desc_str, int len);
1035 * @note Configuration parameter values may only be set when the driver is closed. Values are applied when the
1052 * @note Configuration parameter values may only be set when the driver is closed. Values are applied when the
1069 * @note Configuration parameter values may only be set when the driver is closed. Values are applied when the
1073hipFileError_t hipFileSetParameterString(hipFileStringConfigParameter_t param, const char *desc_str);
hipFileError_t hipFileWriteAsync(hipFileHandle_t fh, void *buffer_base, unsigned long *size_p, hoff_t *file_offset_p, hoff_t *buffer_offset_p, ssize_t *bytes_written_p, hipStream_t stream)
Perform an asynchronous write to a stream.
hipFileError_t hipFileStreamRegister(hipStream_t stream, unsigned flags)
Register a stream to be used by for asynchronous GPU IO.
hipFileError_t hipFileStreamDeregister(hipStream_t stream)
Deregister a stream and free the associated resources.
hipFileError_t hipFileReadAsync(hipFileHandle_t fh, void *buffer_base, unsigned long *size_p, hoff_t *file_offset_p, hoff_t *buffer_offset_p, ssize_t *bytes_read_p, hipStream_t stream)
Perform an asynchronous read from a stream.
void * cookie
Optionally used to track IO operations (e.g. self-reference pointer)
Definition hipfile.h:716
unsigned long ret
Number of bytes transferred or POSIX error code if negative.
Definition hipfile.h:726
void * cookie
Optionally used to track IO operations (e.g. pointer to corresponding hipFileIOParams)
Definition hipfile.h:724
hipFileError_t hipFileBatchIOCancel(hipFileBatchHandle_t batch_idp)
Cancels all pending batch IO operations.
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 hipFileBatchIOSetUp(hipFileBatchHandle_t *batch_idp, unsigned max_nr)
Prepare the system to perform a batch IO operation.
void hipFileBatchIODestroy(hipFileBatchHandle_t batch_idp)
Destroys the batch IO handle and frees the associated resources.
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.
@ hipFileInvalid
Batch IO operation was rejected for being invalid or could not be queued.
Definition hipfile.h:685
hipFileError_t hipFileGetParameterString(hipFileStringConfigParameter_t param, char *desc_str, int len)
Get the value of a string configuration parameter.
hipFileError_t hipFileGetParameterBool(hipFileBoolConfigParameter_t param, bool *value)
Get the value of a Boolean configuration parameter.
hipFileError_t hipFileSetParameterSizeT(hipFileSizeTConfigParameter_t param, unsigned long value)
Set the value of a size_t configuration parameter.
hipFileError_t hipFileSetParameterString(hipFileStringConfigParameter_t param, const char *desc_str)
Set the value of a string configuration parameter.
hipFileError_t hipFileSetParameterBool(hipFileBoolConfigParameter_t param, bool value)
Set the value of a Boolean configuration parameter.
hipFileError_t hipFileGetParameterSizeT(hipFileSizeTConfigParameter_t param, unsigned long *value)
Get the value of a size_t configuration parameter.
hipFileError_t hipFileGetVersion(unsigned *major, unsigned *minor, unsigned *patch)
Get the version of the hipFile library.
@ hipFileParamPropertiesMaxDevicePinnedMemSizeKB
Max device pinned memory size (KiB)
Definition hipfile.h:937
uint64_t max_device_cache_size
Maximum amount of GPU memory (in KiB) that can be used for bounce buffers.
Definition hipfile.h:352
uint64_t per_buffer_cache_size
Amount of GPU memory (in KiB) allocated for each bounce buffer.
Definition hipfile.h:354
uint64_t max_device_pinned_mem_size
Maximum amount of GPU memory (in KiB) that can be pinned.
Definition hipfile.h:355
unsigned max_batch_io_count
Maximum number of batch operations that can be submitted at once.
Definition hipfile.h:357
unsigned max_batch_io_timeout_msecs
Timeout (in msec) for a batch operation to complete.
Definition hipfile.h:358
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 hipFileDriverOpen(void)
Initialize the GPU IO driver for this process.
hipFileDriverStatusFlags_t
Filesystems/storage protocols supported by GPU IO on this system.
Definition hipfile.h:294
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.
const char * hipFileGetOpErrorString(hipFileOpError_t status)
Return a descriptive string for a hipFile error.
@ hipFilePlatformNotSupported
hipFile is not supported on the current platform
Definition hipfile.h:144
@ hipFileHandleAlreadyRegistered
File handle for GPU IO is already registered.
Definition hipfile.h:165
@ hipFileDriverVersionMismatch
hipFile version does not match GPU IO driver version
Definition hipfile.h:141
@ hipFileHipDriverError
GPU driver error: Inspect the hipError_t value for additional information.
Definition hipfile.h:148
@ hipFileDriverClosing
GPU IO driver is closing and not accepting new requests.
Definition hipfile.h:143
@ hipFileHipMemoryTypeInvalid
Memory type backing pointer is incompatible with hipFile.
Definition hipfile.h:150
hipFileError_t hipFileBufDeregister(const void *buffer_base)
Deregisters a GPU memory region from being used with GPU IO.
void hipFileHandleDeregister(hipFileHandle_t fh)
Deregisters a file from GPU IO.
hipFileError_t hipFileBufRegister(const void *buffer_base, unsigned long length, int flags)
Registers a GPU memory region to be used with GPU IO.
hipFileError_t hipFileHandleRegister(hipFileHandle_t *fh, hipFileDescr_t *descr)
Registers an open file for GPU IO.
ssize_t hipFileRead(hipFileHandle_t fh, void *buffer_base, unsigned long size, hoff_t file_offset, hoff_t buffer_offset)
Synchronously read data from a file into a GPU buffer.
ssize_t hipFileWrite(hipFileHandle_t fh, const void *buffer_base, unsigned long size, hoff_t file_offset, hoff_t buffer_offset)
Synchronously write data from a GPU buffer to a file.
Generated by