#include <pi_hip.hpp>
#include <sycl/detail/defines.hpp>
#include <sycl/detail/hip_definitions.hpp>
#include <sycl/detail/pi.hpp>
#include <algorithm>
#include <cassert>
#include <chrono>
#include <hip/hip_runtime.h>
#include <limits>
#include <memory>
#include <mutex>
#include <regex>
#include <string.h>
#include <string_view>
Go to the source code of this file.
Classes | |
class | ReleaseGuard< T > |
RAII object that calls the reference count release function on the held PI object on destruction. More... | |
Namespaces | |
sycl | |
---— Error handling, matching OpenCL plugin semantics. | |
sycl::_V1 | |
sycl::_V1::detail | |
sycl::_V1::detail::pi | |
Macros | |
#define | _PI_CL(pi_api, hip_api) (PluginInit->PiFunctionTable).pi_api = (decltype(&::pi_api))(&hip_api); |
Functions | |
void | sycl::_V1::detail::pi::die (const char *Message) |
void | sycl::_V1::detail::pi::hipPrint (const char *Message) |
void | sycl::_V1::detail::pi::assertion (bool Condition, const char *Message=nullptr) |
pi_result | hip_piEnqueueEventsWait (pi_queue command_queue, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
Enqueues a wait on the given queue for all events. More... | |
pi_result | hip_piEnqueueEventsWaitWithBarrier (pi_queue command_queue, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
Enqueues a wait on the given queue for all specified events. More... | |
pi_result | hip_piEventRelease (pi_event event) |
pi_result | hip_piEventRetain (pi_event event) |
pi_result | enqueueEventWait (pi_queue queue, pi_event event) |
std::string | getKernelNames (pi_program program) |
Finds kernel names by searching for entry points in the PTX source, as the HIP driver API doesn't expose an operation for this. More... | |
pi_result | hip_piPlatformsGet (pi_uint32 num_entries, pi_platform *platforms, pi_uint32 *num_platforms) |
Obtains the HIP platform. More... | |
pi_result | hip_piPlatformGetInfo ([[maybe_unused]] pi_platform platform, pi_platform_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) |
pi_result | hip_piDevicesGet (pi_platform platform, pi_device_type device_type, pi_uint32 num_entries, pi_device *devices, pi_uint32 *num_devices) |
pi_result | hip_piDeviceRetain (pi_device device) |
pi_result | hip_piContextGetInfo (pi_context context, pi_context_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) |
pi_result | hip_piContextRetain (pi_context context) |
pi_result | hip_piextContextSetExtendedDeleter (pi_context context, pi_context_extended_deleter function, void *user_data) |
pi_result | hip_piDevicePartition (pi_device device, const pi_device_partition_property *properties, pi_uint32 num_devices, pi_device *out_devices, pi_uint32 *out_num_devices) |
Not applicable to HIP, devices cannot be partitioned. More... | |
pi_result | hip_piextDeviceSelectBinary (pi_device device, pi_device_binary *binaries, pi_uint32 num_binaries, pi_uint32 *selected_binary) |
pi_result | hip_piextGetDeviceFunctionPointer ([[maybe_unused]] pi_device device, pi_program program, const char *func_name, pi_uint64 *func_pointer_ret) |
pi_result | hip_piDeviceRelease (pi_device device) |
pi_result | hip_piDeviceGetInfo (pi_device device, pi_device_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) |
pi_result | hip_piextDeviceGetNativeHandle (pi_device device, pi_native_handle *nativeHandle) |
Gets the native HIP handle of a PI device object. More... | |
pi_result | hip_piextDeviceCreateWithNativeHandle (pi_native_handle nativeHandle, pi_platform platform, pi_device *device) |
Created a PI device object from a HIP device handle. More... | |
pi_result | hip_piContextCreate (const pi_context_properties *properties, [[maybe_unused]] pi_uint32 num_devices, const pi_device *devices, [[maybe_unused]] void(*pfn_notify)(const char *errinfo, const void *private_info, size_t cb, [[maybe_unused]] void *user_data), [[maybe_unused]] void *user_data, pi_context *retcontext) |
Create a PI HIP context. More... | |
pi_result | hip_piContextRelease (pi_context ctxt) |
pi_result | hip_piextContextGetNativeHandle (pi_context context, pi_native_handle *nativeHandle) |
Gets the native HIP handle of a PI context object. More... | |
pi_result | hip_piextContextCreateWithNativeHandle (pi_native_handle nativeHandle, pi_uint32 num_devices, const pi_device *devices, bool ownNativeHandle, pi_context *context) |
Created a PI context object from a HIP context handle. More... | |
pi_result | hip_piMemBufferCreate (pi_context context, pi_mem_flags flags, size_t size, void *host_ptr, pi_mem *ret_mem, [[maybe_unused]] const pi_mem_properties *properties) |
Creates a PI Memory object using a HIP memory allocation. More... | |
pi_result | hip_piMemRelease (pi_mem memObj) |
Decreases the reference count of the Mem object. More... | |
pi_result | hip_piMemBufferPartition (pi_mem parent_buffer, pi_mem_flags flags, [[maybe_unused]] pi_buffer_create_type buffer_create_type, void *buffer_create_info, pi_mem *memObj) |
Implements a buffer partition in the HIP backend. More... | |
pi_result | hip_piMemGetInfo (pi_mem memObj, pi_mem_info queriedInfo, size_t expectedQuerySize, void *queryOutput, size_t *writtenQuerySize) |
pi_result | hip_piextMemGetNativeHandle (pi_mem mem, pi_native_handle *nativeHandle) |
Gets the native HIP handle of a PI mem object. More... | |
pi_result | hip_piextMemCreateWithNativeHandle (pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle, pi_mem *mem) |
Created a PI mem object from a HIP mem handle. More... | |
pi_result | hip_piextMemImageCreateWithNativeHandle (pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle, const pi_image_format *ImageFormat, const pi_image_desc *ImageDesc, pi_mem *mem) |
Created a PI image mem object from a HIP image mem handle. More... | |
pi_result | hip_piQueueCreate (pi_context context, pi_device device, pi_queue_properties properties, pi_queue *queue) |
Creates a pi_queue object on the HIP backend. More... | |
pi_result | hip_piextQueueCreate (pi_context Context, pi_device Device, pi_queue_properties *Properties, pi_queue *Queue) |
pi_result | hip_piQueueGetInfo (pi_queue command_queue, pi_queue_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) |
pi_result | hip_piQueueRetain (pi_queue command_queue) |
pi_result | hip_piQueueRelease (pi_queue command_queue) |
pi_result | hip_piQueueFinish (pi_queue command_queue) |
pi_result | hip_piQueueFlush (pi_queue command_queue) |
pi_result | hip_piextQueueGetNativeHandle (pi_queue queue, pi_native_handle *nativeHandle, int32_t *NativeHandleDesc) |
Gets the native HIP handle of a PI queue object. More... | |
pi_result | hip_piextQueueCreateWithNativeHandle (pi_native_handle nativeHandle, int32_t NativeHandleDesc, pi_context context, pi_device device, bool ownNativeHandle, pi_queue_properties *Properties, pi_queue *queue) |
Created a PI queue object from a HIP queue handle. More... | |
pi_result | hip_piEnqueueMemBufferWrite (pi_queue command_queue, pi_mem buffer, pi_bool blocking_write, size_t offset, size_t size, void *ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
pi_result | hip_piEnqueueMemBufferRead (pi_queue command_queue, pi_mem buffer, pi_bool blocking_read, size_t offset, size_t size, void *ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
pi_result | hip_piEventsWait (pi_uint32 num_events, const pi_event *event_list) |
pi_result | hip_piKernelCreate (pi_program program, const char *kernel_name, pi_kernel *kernel) |
pi_result | hip_piKernelSetArg (pi_kernel kernel, pi_uint32 arg_index, size_t arg_size, const void *arg_value) |
pi_result | hip_piextKernelSetArgMemObj (pi_kernel kernel, pi_uint32 arg_index, const pi_mem *arg_value) |
pi_result | hip_piextKernelSetArgSampler (pi_kernel kernel, pi_uint32 arg_index, const pi_sampler *arg_value) |
pi_result | hip_piEnqueueKernelLaunch (pi_queue command_queue, pi_kernel kernel, pi_uint32 work_dim, const size_t *global_work_offset, const size_t *global_work_size, const size_t *local_work_size, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
pi_result | hip_piEnqueueNativeKernel (pi_queue queue, void(*user_func)(void *), void *args, size_t cb_args, pi_uint32 num_mem_objects, const pi_mem *mem_list, const void **args_mem_loc, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
\TODO Not implemented More... | |
pi_result | hip_piMemImageCreate (pi_context context, pi_mem_flags flags, const pi_image_format *image_format, const pi_image_desc *image_desc, void *host_ptr, pi_mem *ret_mem) |
\TODO Not implemented More... | |
pi_result | hip_piMemImageGetInfo (pi_mem image, pi_image_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) |
\TODO Not implemented More... | |
pi_result | hip_piMemRetain (pi_mem mem) |
pi_result | hip_piclProgramCreateWithSource (pi_context context, pi_uint32 count, const char **strings, const size_t *lengths, pi_program *program) |
Not used as HIP backend only creates programs from binary. More... | |
pi_result | hip_piProgramBuild (pi_program program, [[maybe_unused]] pi_uint32 num_devices, [[maybe_unused]] const pi_device *device_list, const char *options, [[maybe_unused]] void(*pfn_notify)(pi_program program, void *user_data), [[maybe_unused]] void *user_data) |
Loads the images from a PI program into a HIPmodule that can be used later on to extract functions (kernels). More... | |
pi_result | hip_piProgramCreate (pi_context context, const void *il, size_t length, pi_program *res_program) |
\TODO Not implemented More... | |
pi_result | hip_piProgramCreateWithBinary (pi_context context, [[maybe_unused]] pi_uint32 num_devices, [[maybe_unused]] const pi_device *device_list, const size_t *lengths, const unsigned char **binaries, size_t num_metadata_entries, const pi_device_binary_property *metadata, pi_int32 *binary_status, pi_program *program) |
Loads images from a list of PTX or HIPBIN binaries. More... | |
pi_result | hip_piProgramGetInfo (pi_program program, pi_program_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) |
pi_result | hip_piProgramLink (pi_context context, pi_uint32 num_devices, const pi_device *device_list, const char *options, pi_uint32 num_input_programs, const pi_program *input_programs, void(*pfn_notify)(pi_program program, void *user_data), void *user_data, pi_program *ret_program) |
pi_result | hip_piProgramCompile (pi_program program, [[maybe_unused]] pi_uint32 num_devices, [[maybe_unused]] const pi_device *device_list, const char *options, [[maybe_unused]] pi_uint32 num_input_headers, const pi_program *input_headers, const char **header_include_names, [[maybe_unused]] void(*pfn_notify)(pi_program program, void *user_data), [[maybe_unused]] void *user_data) |
Creates a new program that is the outcome of the compilation of the headers and the program. More... | |
pi_result | hip_piProgramGetBuildInfo (pi_program program, pi_device device, pi_program_build_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) |
pi_result | hip_piProgramRetain (pi_program program) |
pi_result | hip_piProgramRelease (pi_program program) |
Decreases the reference count of a pi_program object. More... | |
pi_result | hip_piextProgramGetNativeHandle (pi_program program, pi_native_handle *nativeHandle) |
Gets the native HIP handle of a PI program object. More... | |
pi_result | hip_piextProgramCreateWithNativeHandle (pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle, pi_program *program) |
Created a PI program object from a HIP program handle. More... | |
pi_result | hip_piKernelGetInfo (pi_kernel kernel, pi_kernel_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) |
pi_result | hip_piKernelGetGroupInfo (pi_kernel kernel, pi_device device, pi_kernel_group_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) |
pi_result | hip_piKernelGetSubGroupInfo (pi_kernel kernel, pi_device device, pi_kernel_sub_group_info param_name, size_t input_value_size, const void *input_value, size_t param_value_size, void *param_value, size_t *param_value_size_ret) |
pi_result | hip_piKernelRetain (pi_kernel kernel) |
pi_result | hip_piKernelRelease (pi_kernel kernel) |
pi_result | hip_piKernelSetExecInfo (pi_kernel kernel, pi_kernel_exec_info param_name, size_t param_value_size, const void *param_value) |
pi_result | hip_piextProgramSetSpecializationConstant (pi_program, pi_uint32, size_t, const void *) |
pi_result | hip_piextKernelSetArgPointer (pi_kernel kernel, pi_uint32 arg_index, size_t arg_size, const void *arg_value) |
pi_result | hip_piEventCreate (pi_context context, pi_event *event) |
pi_result | hip_piEventGetInfo (pi_event event, pi_event_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) |
pi_result | hip_piEventGetProfilingInfo (pi_event event, pi_profiling_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) |
Obtain profiling information from PI HIP events Timings from HIP are only elapsed time. More... | |
pi_result | hip_piEventSetCallback (pi_event event, pi_int32 command_exec_callback_type, pfn_notify notify, void *user_data) |
pi_result | hip_piEventSetStatus (pi_event event, pi_int32 execution_status) |
pi_result | hip_piextEventGetNativeHandle (pi_event event, pi_native_handle *nativeHandle) |
Gets the native HIP handle of a PI event object. More... | |
pi_result | hip_piextEventCreateWithNativeHandle (pi_native_handle nativeHandle, pi_context context, bool ownNativeHandle, pi_event *event) |
Created a PI event object from a HIP event handle. More... | |
pi_result | hip_piSamplerCreate (pi_context context, const pi_sampler_properties *sampler_properties, pi_sampler *result_sampler) |
Creates a PI sampler object. More... | |
pi_result | hip_piSamplerGetInfo (pi_sampler sampler, pi_sampler_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) |
Gets information from a PI sampler object. More... | |
pi_result | hip_piSamplerRetain (pi_sampler sampler) |
Retains a PI sampler object, incrementing its reference count. More... | |
pi_result | hip_piSamplerRelease (pi_sampler sampler) |
Releases a PI sampler object, decrementing its reference count. More... | |
static pi_result | commonEnqueueMemBufferCopyRect (hipStream_t hip_stream, pi_buff_rect_region region, const void *src_ptr, const hipMemoryType src_type, pi_buff_rect_offset src_offset, size_t src_row_pitch, size_t src_slice_pitch, void *dst_ptr, const hipMemoryType dst_type, pi_buff_rect_offset dst_offset, size_t dst_row_pitch, size_t dst_slice_pitch) |
General 3D memory copy operation. More... | |
pi_result | hip_piEnqueueMemBufferReadRect (pi_queue command_queue, pi_mem buffer, pi_bool blocking_read, pi_buff_rect_offset buffer_offset, pi_buff_rect_offset host_offset, pi_buff_rect_region region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, void *ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
pi_result | hip_piEnqueueMemBufferWriteRect (pi_queue command_queue, pi_mem buffer, pi_bool blocking_write, pi_buff_rect_offset buffer_offset, pi_buff_rect_offset host_offset, pi_buff_rect_region region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, const void *ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
pi_result | hip_piEnqueueMemBufferCopy (pi_queue command_queue, pi_mem src_buffer, pi_mem dst_buffer, size_t src_offset, size_t dst_offset, size_t size, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
pi_result | hip_piEnqueueMemBufferCopyRect (pi_queue command_queue, pi_mem src_buffer, pi_mem dst_buffer, pi_buff_rect_offset src_origin, pi_buff_rect_offset dst_origin, pi_buff_rect_region region, size_t src_row_pitch, size_t src_slice_pitch, size_t dst_row_pitch, size_t dst_slice_pitch, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
pi_result | hip_piEnqueueMemBufferFill (pi_queue command_queue, pi_mem buffer, const void *pattern, size_t pattern_size, size_t offset, size_t size, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
static size_t | imageElementByteSize (hipArray_Format array_format) |
static pi_result | commonEnqueueMemImageNDCopy (hipStream_t hip_stream, pi_mem_type img_type, const size_t *region, const void *src_ptr, const hipMemoryType src_type, const size_t *src_offset, void *dst_ptr, const hipMemoryType dst_type, const size_t *dst_offset) |
General ND memory copy operation for images (where N > 1). More... | |
pi_result | hip_piEnqueueMemImageRead (pi_queue command_queue, pi_mem image, pi_bool blocking_read, const size_t *origin, const size_t *region, size_t row_pitch, size_t slice_pitch, void *ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
pi_result | hip_piEnqueueMemImageWrite (pi_queue command_queue, pi_mem image, pi_bool blocking_write, const size_t *origin, const size_t *region, size_t input_row_pitch, size_t input_slice_pitch, const void *ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
pi_result | hip_piEnqueueMemImageCopy (pi_queue command_queue, pi_mem src_image, pi_mem dst_image, const size_t *src_origin, const size_t *dst_origin, const size_t *region, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
pi_result | hip_piEnqueueMemImageFill (pi_queue command_queue, pi_mem image, const void *fill_color, const size_t *origin, const size_t *region, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
\TODO Not implemented in HIP. More... | |
pi_result | hip_piEnqueueMemBufferMap (pi_queue command_queue, pi_mem buffer, pi_bool blocking_map, pi_map_flags map_flags, size_t offset, size_t size, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event, void **ret_map) |
Implements mapping on the host using a BufferRead operation. More... | |
pi_result | hip_piEnqueueMemUnmap (pi_queue command_queue, pi_mem memobj, void *mapped_ptr, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
Implements the unmap from the host, using a BufferWrite operation. More... | |
pi_result | hip_piextUSMHostAlloc (void **result_ptr, pi_context context, [[maybe_unused]] pi_usm_mem_properties *properties, size_t size, [[maybe_unused]] pi_uint32 alignment) |
USM: Implements USM Host allocations using HIP Pinned Memory. More... | |
pi_result | hip_piextUSMDeviceAlloc (void **result_ptr, pi_context context, [[maybe_unused]] pi_device device, [[maybe_unused]] pi_usm_mem_properties *properties, size_t size, [[maybe_unused]] pi_uint32 alignment) |
USM: Implements USM device allocations using a normal HIP device pointer. More... | |
pi_result | hip_piextUSMSharedAlloc (void **result_ptr, pi_context context, [[maybe_unused]] pi_device device, [[maybe_unused]] pi_usm_mem_properties *properties, size_t size, [[maybe_unused]] pi_uint32 alignment) |
USM: Implements USM Shared allocations using HIP Managed Memory. More... | |
pi_result | hip_piextUSMFree (pi_context context, void *ptr) |
USM: Frees the given USM pointer associated with the context. More... | |
pi_result | hip_piextUSMEnqueueMemset (pi_queue queue, void *ptr, pi_int32 value, size_t count, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, pi_event *event) |
pi_result | hip_piextUSMEnqueueMemcpy (pi_queue queue, pi_bool blocking, void *dst_ptr, const void *src_ptr, size_t size, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, pi_event *event) |
pi_result | hip_piextUSMEnqueuePrefetch (pi_queue queue, const void *ptr, size_t size, pi_usm_migration_flags flags, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, pi_event *event) |
pi_result | hip_piextUSMEnqueueMemAdvise (pi_queue queue, [[maybe_unused]] const void *ptr, size_t length, pi_mem_advice advice, pi_event *event) |
USM: memadvise API to govern behavior of automatic migration mechanisms. More... | |
pi_result | hip_piextUSMEnqueueFill2D (pi_queue, void *, size_t, size_t, const void *, size_t, size_t, pi_uint32, const pi_event *, pi_event *) |
pi_result | hip_piextUSMEnqueueMemset2D (pi_queue, void *, size_t, int, size_t, size_t, pi_uint32, const pi_event *, pi_event *) |
pi_result | hip_piextUSMEnqueueMemcpy2D (pi_queue queue, pi_bool blocking, void *dst_ptr, size_t dst_pitch, const void *src_ptr, size_t src_pitch, size_t width, size_t height, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
2D Memcpy API More... | |
pi_result | hip_piextUSMGetMemAllocInfo (pi_context context, const void *ptr, pi_mem_alloc_info param_name, size_t param_value_size, void *param_value, size_t *param_value_size_ret) |
API to query information about USM allocated pointers Valid Queries: PI_MEM_ALLOC_TYPE returns host/device/shared pi_host_usm value PI_MEM_ALLOC_BASE_PTR returns the base ptr of an allocation if the queried pointer fell inside an allocation. More... | |
pi_result | hip_piextEnqueueDeviceGlobalVariableWrite (pi_queue queue, pi_program program, const char *name, pi_bool blocking_write, size_t count, size_t offset, const void *src, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
pi_result | hip_piextEnqueueDeviceGlobalVariableRead (pi_queue queue, pi_program program, const char *name, pi_bool blocking_read, size_t count, size_t offset, void *dst, pi_uint32 num_events_in_wait_list, const pi_event *event_wait_list, pi_event *event) |
pi_result | hip_piextEnqueueReadHostPipe (pi_queue queue, pi_program program, const char *pipe_symbol, pi_bool blocking, void *ptr, size_t size, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, pi_event *event) |
Host Pipes. More... | |
pi_result | hip_piextEnqueueWriteHostPipe (pi_queue queue, pi_program program, const char *pipe_symbol, pi_bool blocking, void *ptr, size_t size, pi_uint32 num_events_in_waitlist, const pi_event *events_waitlist, pi_event *event) |
pi_result | hip_piTearDown (void *PluginParameter) |
pi_result | hip_piGetDeviceAndHostTimer (pi_device Device, uint64_t *DeviceTime, uint64_t *HostTime) |
pi_result | piPluginInit (pi_plugin *PluginInit) |
Variables | |
const char | SupportedVersion [] = _PI_HIP_PLUGIN_VERSION_STRING |
Implementation of HIP Plugin.
Definition in file pi_hip.cpp.
#define _PI_CL | ( | pi_api, | |
hip_api | |||
) | (PluginInit->PiFunctionTable).pi_api = (decltype(&::pi_api))(&hip_api); |
|
static |
General 3D memory copy operation.
This function requires the corresponding HIP context to be at the top of the context stack If the source and/or destination is on the device, src_ptr and/or dst_ptr must be a pointer to a hipDevPtr
Definition at line 4303 of file pi_hip.cpp.
References pi_buff_rect_region_struct::depth_scalar, pi_buff_rect_region_struct::height_scalar, pi_buff_rect_region_struct::width_bytes, pi_buff_rect_offset_struct::x_bytes, pi_buff_rect_offset_struct::y_scalar, and pi_buff_rect_offset_struct::z_scalar.
Referenced by hip_piEnqueueMemBufferCopyRect(), hip_piEnqueueMemBufferReadRect(), and hip_piEnqueueMemBufferWriteRect().
|
static |
General ND memory copy operation for images (where N > 1).
This function requires the corresponding HIP context to be at the top of the context stack If the source and/or destination is an array, src_ptr and/or dst_ptr must be a pointer to a hipArray
Definition at line 4687 of file pi_hip.cpp.
References PI_MEM_TYPE_IMAGE2D, and PI_MEM_TYPE_IMAGE3D.
Referenced by hip_piEnqueueMemImageCopy(), hip_piEnqueueMemImageRead(), and hip_piEnqueueMemImageWrite().
Definition at line 696 of file pi_hip.cpp.
References _pi_queue::for_each_stream().
std::string getKernelNames | ( | pi_program | program | ) |
Finds kernel names by searching for entry points in the PTX source, as the HIP driver API doesn't expose an operation for this.
Note: This is currently only being used by the SYCL program class for the has_kernel method, so an alternative would be to move the has_kernel query to PI and use hipModuleGetFunction to check for a kernel.
Definition at line 762 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by hip_piProgramGetInfo().
pi_result hip_piclProgramCreateWithSource | ( | pi_context | context, |
pi_uint32 | count, | ||
const char ** | strings, | ||
const size_t * | lengths, | ||
pi_program * | program | ||
) |
Not used as HIP backend only creates programs from binary.
See hip_piclProgramCreateWithBinary.
Definition at line 3364 of file pi_hip.cpp.
References sycl::_V1::detail::pi::hipPrint().
Referenced by piPluginInit().
pi_result hip_piContextCreate | ( | const pi_context_properties * | properties, |
[[maybe_unused] ] pi_uint32 | num_devices, | ||
const pi_device * | devices, | ||
[[maybe_unused] ] void(*)(const char *errinfo, const void *private_info, size_t cb, [[maybe_unused]] void *user_data) | pfn_notify, | ||
[[maybe_unused] ] void * | user_data, | ||
pi_context * | retcontext | ||
) |
Create a PI HIP context.
By default creates a scoped context and keeps the last active HIP context on top of the HIP context stack. With the __SYCL_PI_CONTEXT_PROPERTIES_HIP_PRIMARY key/id and a value of PI_TRUE creates a primary HIP context and activates it on the HIP context stack.
[in] | properties | 0 terminated array of key/id-value combinations. Can be nullptr. Only accepts property key/id __SYCL_PI_CONTEXT_PROPERTIES_HIP_PRIMARY with a pi_bool value. |
[in] | num_devices | Number of devices to create the context for. |
[in] | devices | Devices to create the context for. |
[in] | pfn_notify | Callback, currently unused. |
[in] | user_data | User data for callback. |
[out] | retcontext | Set to created context on success. |
Definition at line 2077 of file pi_hip.cpp.
References __SYCL_PI_CONTEXT_PROPERTIES_HIP_PRIMARY, sycl::_V1::detail::pi::die(), _pi_platform::evBase_, std::get(), PI_FALSE, PI_TRUE, _pi_context::primary, and _pi_context::user_defined.
Referenced by piPluginInit().
pi_result hip_piContextGetInfo | ( | pi_context | context, |
pi_context_info | param_name, | ||
size_t | param_value_size, | ||
void * | param_value, | ||
size_t * | param_value_size_ret | ||
) |
Definition at line 1013 of file pi_hip.cpp.
References __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME, _pi_context::get_device(), _pi_context::get_reference_count(), getInfo(), PI_CONTEXT_INFO_DEVICES, PI_CONTEXT_INFO_NUM_DEVICES, PI_CONTEXT_INFO_REFERENCE_COUNT, PI_EXT_CONTEXT_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES, PI_EXT_CONTEXT_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES, PI_EXT_CONTEXT_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES, PI_EXT_CONTEXT_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES, PI_EXT_ONEAPI_CONTEXT_INFO_USM_FILL2D_SUPPORT, PI_EXT_ONEAPI_CONTEXT_INFO_USM_MEMCPY2D_SUPPORT, PI_EXT_ONEAPI_CONTEXT_INFO_USM_MEMSET2D_SUPPORT, and setErrorMessage().
Referenced by piPluginInit().
pi_result hip_piContextRelease | ( | pi_context | ctxt | ) |
Definition at line 2167 of file pi_hip.cpp.
References _pi_context::decrement_reference_count(), _pi_device::get(), _pi_context::get(), _pi_context::get_device(), _pi_context::invoke_extended_deleters(), and _pi_context::is_primary().
Referenced by piPluginInit(), _pi_kernel::~_pi_kernel(), _pi_mem::~_pi_mem(), and _pi_queue::~_pi_queue().
pi_result hip_piContextRetain | ( | pi_context | context | ) |
Definition at line 1051 of file pi_hip.cpp.
References _pi_context::get_reference_count(), and _pi_context::increment_reference_count().
Referenced by piPluginInit().
pi_result hip_piDeviceGetInfo | ( | pi_device | device, |
pi_device_info | param_name, | ||
size_t | param_value_size, | ||
void * | param_value, | ||
size_t * | param_value_size_ret | ||
) |
Definition at line 1145 of file pi_hip.cpp.
References __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME, sycl::_V1::detail::pi::assertion(), sycl::_V1::detail::pi::die(), getInfo(), getInfoArray(), min(), PI_DEVICE_EXEC_CAPABILITIES_KERNEL, PI_DEVICE_INFO_ADDRESS_BITS, PI_DEVICE_INFO_ATOMIC_64, PI_DEVICE_INFO_AVAILABLE, PI_DEVICE_INFO_BACKEND_VERSION, PI_DEVICE_INFO_BUILD_ON_SUBDEVICE, PI_DEVICE_INFO_BUILT_IN_KERNELS, PI_DEVICE_INFO_COMPILER_AVAILABLE, PI_DEVICE_INFO_DEVICE_ID, PI_DEVICE_INFO_DOUBLE_FP_CONFIG, PI_DEVICE_INFO_DRIVER_VERSION, PI_DEVICE_INFO_ENDIAN_LITTLE, PI_DEVICE_INFO_ERROR_CORRECTION_SUPPORT, PI_DEVICE_INFO_EXECUTION_CAPABILITIES, PI_DEVICE_INFO_EXTENSION_DEVICELIB_ASSERT, PI_DEVICE_INFO_EXTENSIONS, PI_DEVICE_INFO_GLOBAL_MEM_CACHE_SIZE, PI_DEVICE_INFO_GLOBAL_MEM_CACHE_TYPE, PI_DEVICE_INFO_GLOBAL_MEM_CACHELINE_SIZE, PI_DEVICE_INFO_GLOBAL_MEM_SIZE, PI_DEVICE_INFO_GPU_EU_COUNT, PI_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE, PI_DEVICE_INFO_GPU_EU_SIMD_WIDTH, PI_DEVICE_INFO_GPU_HW_THREADS_PER_EU, PI_DEVICE_INFO_GPU_SLICES, PI_DEVICE_INFO_GPU_SUBSLICES_PER_SLICE, PI_DEVICE_INFO_HALF_FP_CONFIG, PI_DEVICE_INFO_HOST_UNIFIED_MEMORY, PI_DEVICE_INFO_IMAGE2D_MAX_HEIGHT, PI_DEVICE_INFO_IMAGE2D_MAX_WIDTH, PI_DEVICE_INFO_IMAGE3D_MAX_DEPTH, PI_DEVICE_INFO_IMAGE3D_MAX_HEIGHT, PI_DEVICE_INFO_IMAGE3D_MAX_WIDTH, PI_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE, PI_DEVICE_INFO_IMAGE_MAX_BUFFER_SIZE, PI_DEVICE_INFO_IMAGE_SRGB, PI_DEVICE_INFO_IMAGE_SUPPORT, PI_DEVICE_INFO_LINKER_AVAILABLE, PI_DEVICE_INFO_LOCAL_MEM_SIZE, PI_DEVICE_INFO_LOCAL_MEM_TYPE, PI_DEVICE_INFO_MAX_CLOCK_FREQUENCY, PI_DEVICE_INFO_MAX_COMPUTE_UNITS, PI_DEVICE_INFO_MAX_CONSTANT_ARGS, PI_DEVICE_INFO_MAX_CONSTANT_BUFFER_SIZE, PI_DEVICE_INFO_MAX_MEM_ALLOC_SIZE, PI_DEVICE_INFO_MAX_MEM_BANDWIDTH, PI_DEVICE_INFO_MAX_NUM_SUB_GROUPS, PI_DEVICE_INFO_MAX_PARAMETER_SIZE, PI_DEVICE_INFO_MAX_READ_IMAGE_ARGS, PI_DEVICE_INFO_MAX_SAMPLERS, PI_DEVICE_INFO_MAX_WORK_GROUP_SIZE, PI_DEVICE_INFO_MAX_WORK_ITEM_DIMENSIONS, PI_DEVICE_INFO_MAX_WORK_ITEM_SIZES, PI_DEVICE_INFO_MAX_WRITE_IMAGE_ARGS, PI_DEVICE_INFO_MEM_BASE_ADDR_ALIGN, PI_DEVICE_INFO_NAME, PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR, PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE, PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT, PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF, PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT, PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG, PI_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT, PI_DEVICE_INFO_OPENCL_C_VERSION, PI_DEVICE_INFO_PARENT_DEVICE, PI_DEVICE_INFO_PARTITION_AFFINITY_DOMAIN, PI_DEVICE_INFO_PARTITION_MAX_SUB_DEVICES, PI_DEVICE_INFO_PARTITION_PROPERTIES, PI_DEVICE_INFO_PARTITION_TYPE, PI_DEVICE_INFO_PCI_ADDRESS, PI_DEVICE_INFO_PLATFORM, PI_DEVICE_INFO_PREFERRED_INTEROP_USER_SYNC, PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_CHAR, PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_DOUBLE, PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_FLOAT, PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_HALF, PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_INT, PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_LONG, PI_DEVICE_INFO_PREFERRED_VECTOR_WIDTH_SHORT, PI_DEVICE_INFO_PRINTF_BUFFER_SIZE, PI_DEVICE_INFO_PROFILE, PI_DEVICE_INFO_PROFILING_TIMER_RESOLUTION, PI_DEVICE_INFO_QUEUE_ON_DEVICE_PROPERTIES, PI_DEVICE_INFO_QUEUE_ON_HOST_PROPERTIES, PI_DEVICE_INFO_REFERENCE_COUNT, PI_DEVICE_INFO_SINGLE_FP_CONFIG, PI_DEVICE_INFO_SUB_GROUP_INDEPENDENT_FORWARD_PROGRESS, PI_DEVICE_INFO_SUB_GROUP_SIZES_INTEL, PI_DEVICE_INFO_TYPE, PI_DEVICE_INFO_USM_CROSS_SHARED_SUPPORT, PI_DEVICE_INFO_USM_DEVICE_SUPPORT, PI_DEVICE_INFO_USM_HOST_SUPPORT, PI_DEVICE_INFO_USM_SINGLE_SHARED_SUPPORT, PI_DEVICE_INFO_USM_SYSTEM_SHARED_SUPPORT, PI_DEVICE_INFO_UUID, PI_DEVICE_INFO_VENDOR, PI_DEVICE_INFO_VENDOR_ID, PI_DEVICE_INFO_VERSION, PI_DEVICE_LOCAL_MEM_TYPE_LOCAL, PI_DEVICE_MEM_CACHE_TYPE_READ_WRITE_CACHE, PI_DEVICE_TYPE_GPU, PI_EXT_CODEPLAY_DEVICE_INFO_MAX_REGISTERS_PER_WORK_GROUP, PI_EXT_DEVICE_INFO_ATOMIC_FENCE_ORDER_CAPABILITIES, PI_EXT_DEVICE_INFO_ATOMIC_FENCE_SCOPE_CAPABILITIES, PI_EXT_DEVICE_INFO_ATOMIC_MEMORY_ORDER_CAPABILITIES, PI_EXT_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES, PI_EXT_INTEL_DEVICE_INFO_FREE_MEMORY, PI_EXT_INTEL_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES, PI_EXT_INTEL_DEVICE_INFO_MEM_CHANNEL_SUPPORT, PI_EXT_INTEL_DEVICE_INFO_MEMORY_BUS_WIDTH, PI_EXT_INTEL_DEVICE_INFO_MEMORY_CLOCK_RATE, PI_EXT_ONEAPI_DEVICE_INFO_BFLOAT16_MATH_FUNCTIONS, PI_EXT_ONEAPI_DEVICE_INFO_CUDA_ASYNC_BARRIER, PI_EXT_ONEAPI_DEVICE_INFO_MAX_WORK_GROUPS_3D, PI_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT, PI_FP_DENORM, PI_FP_FMA, PI_FP_INF_NAN, PI_FP_ROUND_TO_INF, PI_FP_ROUND_TO_NEAREST, PI_FP_ROUND_TO_ZERO, PI_MEMORY_ORDER_ACQ_REL, PI_MEMORY_ORDER_ACQUIRE, PI_MEMORY_ORDER_RELAXED, PI_MEMORY_ORDER_RELEASE, PI_MEMORY_SCOPE_SUB_GROUP, PI_MEMORY_SCOPE_WORK_GROUP, PI_MEMORY_SCOPE_WORK_ITEM, PI_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE, PI_QUEUE_FLAG_PROFILING_ENABLE, PI_TRUE, PI_USM_ACCESS, PI_USM_ATOMIC_ACCESS, PI_USM_CONCURRENT_ACCESS, PI_USM_CONCURRENT_ATOMIC_ACCESS, and setErrorMessage().
Referenced by hip_piEnqueueKernelLaunch(), and piPluginInit().
pi_result hip_piDevicePartition | ( | pi_device | device, |
const pi_device_partition_property * | properties, | ||
pi_uint32 | num_devices, | ||
pi_device * | out_devices, | ||
pi_uint32 * | out_num_devices | ||
) |
Not applicable to HIP, devices cannot be partitioned.
Definition at line 1067 of file pi_hip.cpp.
Referenced by piPluginInit().
Definition at line 1140 of file pi_hip.cpp.
Referenced by piPluginInit(), _pi_context::~_pi_context(), and _pi_queue::~_pi_queue().
Definition at line 1008 of file pi_hip.cpp.
Referenced by piPluginInit().
pi_result hip_piDevicesGet | ( | pi_platform | platform, |
pi_device_type | device_type, | ||
pi_uint32 | num_entries, | ||
pi_device * | devices, | ||
pi_uint32 * | num_devices | ||
) |
devices | List of devices available on the system |
num_devices | Number of elements in the list of devices Requesting a non-GPU device triggers an error, all PI HIP devices are GPUs. |
Definition at line 976 of file pi_hip.cpp.
References PI_DEVICE_TYPE_DEFAULT, and PI_DEVICE_TYPE_GPU.
Referenced by piPluginInit().
pi_result hip_piEnqueueEventsWait | ( | pi_queue | command_queue, |
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Enqueues a wait on the given queue for all events.
See enqueueEventWait
Currently queues are represented by a single in-order stream, therefore every command is an implicit barrier and so hip_piEnqueueEventsWait has the same behavior as hip_piEnqueueEventsWaitWithBarrier. So hip_piEnqueueEventsWait can just call hip_piEnqueueEventsWaitWithBarrier.
Definition at line 4037 of file pi_hip.cpp.
References hip_piEnqueueEventsWaitWithBarrier().
Referenced by hip_piEnqueueMemBufferMap(), hip_piEnqueueMemUnmap(), hip_piextUSMEnqueueMemAdvise(), and piPluginInit().
pi_result hip_piEnqueueEventsWaitWithBarrier | ( | pi_queue | command_queue, |
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Enqueues a wait on the given queue for all specified events.
See enqueueEventWaitWithBarrier
If the events list is empty, the enqueued wait will wait on all previous events in the queue.
Definition at line 4050 of file pi_hip.cpp.
References _pi_queue::barrier_event_, _pi_queue::barrier_mutex_, _pi_queue::barrier_tmp_event_, _pi_queue::compute_applied_barrier_, _pi_queue::get_context(), _pi_queue::get_next_compute_stream(), _pi_event::make_native(), PI_COMMAND_TYPE_MARKER, _pi_queue::sync_streams(), and _pi_queue::transfer_applied_barrier_.
Referenced by hip_piEnqueueEventsWait(), hip_piEnqueueKernelLaunch(), and piPluginInit().
pi_result hip_piEnqueueKernelLaunch | ( | pi_queue | command_queue, |
pi_kernel | kernel, | ||
pi_uint32 | work_dim, | ||
const size_t * | global_work_offset, | ||
const size_t * | global_work_size, | ||
const size_t * | local_work_size, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Definition at line 3007 of file pi_hip.cpp.
References _pi_queue::device_, _pi_device::get(), _pi_queue::get_context(), _pi_queue::get_device(), _pi_queue::get_next_compute_stream(), hip_piDeviceGetInfo(), hip_piEnqueueEventsWaitWithBarrier(), _pi_event::make_native(), PI_COMMAND_TYPE_NDRANGE_KERNEL, PI_DEVICE_INFO_MAX_WORK_GROUP_SIZE, PI_DEVICE_INFO_MAX_WORK_ITEM_SIZES, and setErrorMessage().
Referenced by piPluginInit().
pi_result hip_piEnqueueMemBufferCopy | ( | pi_queue | command_queue, |
pi_mem | src_buffer, | ||
pi_mem | dst_buffer, | ||
size_t | src_offset, | ||
size_t | dst_offset, | ||
size_t | size, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Definition at line 4458 of file pi_hip.cpp.
References _pi_mem::mem_::buffer_mem_, _pi_queue::get_context(), _pi_queue::get_next_transfer_stream(), _pi_mem::mem_::buffer_mem_::get_with_offset(), _pi_event::make_native(), _pi_mem::mem_, and PI_COMMAND_TYPE_MEM_BUFFER_COPY.
Referenced by piPluginInit().
pi_result hip_piEnqueueMemBufferCopyRect | ( | pi_queue | command_queue, |
pi_mem | src_buffer, | ||
pi_mem | dst_buffer, | ||
pi_buff_rect_offset | src_origin, | ||
pi_buff_rect_offset | dst_origin, | ||
pi_buff_rect_region | region, | ||
size_t | src_row_pitch, | ||
size_t | src_slice_pitch, | ||
size_t | dst_row_pitch, | ||
size_t | dst_slice_pitch, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Definition at line 4504 of file pi_hip.cpp.
References _pi_mem::mem_::buffer_mem_, commonEnqueueMemBufferCopyRect(), _pi_queue::get_context(), _pi_queue::get_next_transfer_stream(), _pi_mem::mem_::buffer_mem_::get_void(), _pi_event::make_native(), _pi_mem::mem_, and PI_COMMAND_TYPE_MEM_BUFFER_COPY_RECT.
Referenced by piPluginInit().
pi_result hip_piEnqueueMemBufferFill | ( | pi_queue | command_queue, |
pi_mem | buffer, | ||
const void * | pattern, | ||
size_t | pattern_size, | ||
size_t | offset, | ||
size_t | size, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Definition at line 4549 of file pi_hip.cpp.
References _pi_mem::mem_::buffer_mem_, _pi_queue::get_context(), _pi_queue::get_next_transfer_stream(), _pi_mem::mem_::buffer_mem_::get_with_offset(), _pi_event::make_native(), _pi_mem::mem_, and PI_COMMAND_TYPE_MEM_BUFFER_FILL.
Referenced by piPluginInit().
pi_result hip_piEnqueueMemBufferMap | ( | pi_queue | command_queue, |
pi_mem | buffer, | ||
pi_bool | blocking_map, | ||
pi_map_flags | map_flags, | ||
size_t | offset, | ||
size_t | size, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event, | ||
void ** | ret_map | ||
) |
Implements mapping on the host using a BufferRead operation.
Mapped pointers are stored in the pi_mem object. If the buffer uses pinned host memory a pointer to that memory is returned and no read operation is done.
Definition at line 4987 of file pi_hip.cpp.
References _pi_mem::mem_::buffer_mem_::alloc_host_ptr, _pi_mem::mem_::buffer_mem_::allocMode_, _pi_mem::buffer, _pi_mem::mem_::buffer_mem_, _pi_queue::get_context(), _pi_mem::mem_::buffer_mem_::get_map_ptr(), _pi_queue::get_next_transfer_stream(), hip_piEnqueueEventsWait(), hip_piEnqueueMemBufferRead(), _pi_event::make_native(), _pi_mem::mem_::buffer_mem_::map_to_ptr(), _pi_mem::mem_, _pi_mem::mem_type_, PI_COMMAND_TYPE_MEM_BUFFER_MAP, PI_MAP_READ, and PI_MAP_WRITE.
Referenced by piPluginInit().
pi_result hip_piEnqueueMemBufferRead | ( | pi_queue | command_queue, |
pi_mem | buffer, | ||
pi_bool | blocking_read, | ||
size_t | offset, | ||
size_t | size, | ||
void * | ptr, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Definition at line 2810 of file pi_hip.cpp.
References _pi_mem::mem_::buffer_mem_, _pi_queue::get_context(), _pi_queue::get_next_transfer_stream(), _pi_mem::mem_::buffer_mem_::get_with_offset(), _pi_event::make_native(), _pi_mem::mem_, and PI_COMMAND_TYPE_MEM_BUFFER_READ.
Referenced by hip_piEnqueueMemBufferMap(), and piPluginInit().
pi_result hip_piEnqueueMemBufferReadRect | ( | pi_queue | command_queue, |
pi_mem | buffer, | ||
pi_bool | blocking_read, | ||
pi_buff_rect_offset | buffer_offset, | ||
pi_buff_rect_offset | host_offset, | ||
pi_buff_rect_region | region, | ||
size_t | buffer_row_pitch, | ||
size_t | buffer_slice_pitch, | ||
size_t | host_row_pitch, | ||
size_t | host_slice_pitch, | ||
void * | ptr, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Definition at line 4357 of file pi_hip.cpp.
References _pi_mem::mem_::buffer_mem_, commonEnqueueMemBufferCopyRect(), _pi_queue::get_context(), _pi_queue::get_next_transfer_stream(), _pi_mem::mem_::buffer_mem_::get_void(), _pi_event::make_native(), _pi_mem::mem_, and PI_COMMAND_TYPE_MEM_BUFFER_READ_RECT.
Referenced by piPluginInit().
pi_result hip_piEnqueueMemBufferWrite | ( | pi_queue | command_queue, |
pi_mem | buffer, | ||
pi_bool | blocking_write, | ||
size_t | offset, | ||
size_t | size, | ||
void * | ptr, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Definition at line 2765 of file pi_hip.cpp.
References _pi_mem::mem_::buffer_mem_, _pi_queue::get_context(), _pi_queue::get_next_transfer_stream(), _pi_mem::mem_::buffer_mem_::get_with_offset(), _pi_event::make_native(), _pi_mem::mem_, and PI_COMMAND_TYPE_MEM_BUFFER_WRITE.
Referenced by hip_piEnqueueMemUnmap(), and piPluginInit().
pi_result hip_piEnqueueMemBufferWriteRect | ( | pi_queue | command_queue, |
pi_mem | buffer, | ||
pi_bool | blocking_write, | ||
pi_buff_rect_offset | buffer_offset, | ||
pi_buff_rect_offset | host_offset, | ||
pi_buff_rect_region | region, | ||
size_t | buffer_row_pitch, | ||
size_t | buffer_slice_pitch, | ||
size_t | host_row_pitch, | ||
size_t | host_slice_pitch, | ||
const void * | ptr, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Definition at line 4408 of file pi_hip.cpp.
References _pi_mem::mem_::buffer_mem_, commonEnqueueMemBufferCopyRect(), _pi_queue::get_context(), _pi_queue::get_next_transfer_stream(), _pi_mem::mem_::buffer_mem_::get_void(), _pi_event::make_native(), _pi_mem::mem_, and PI_COMMAND_TYPE_MEM_BUFFER_WRITE_RECT.
Referenced by piPluginInit().
pi_result hip_piEnqueueMemImageCopy | ( | pi_queue | command_queue, |
pi_mem | src_image, | ||
pi_mem | dst_image, | ||
const size_t * | src_origin, | ||
const size_t * | dst_origin, | ||
const size_t * | region, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Definition at line 4890 of file pi_hip.cpp.
References commonEnqueueMemImageNDCopy(), _pi_mem::mem_::surface_mem_::get_array(), _pi_queue::get_context(), _pi_mem::mem_::surface_mem_::get_image_type(), _pi_queue::get_next_transfer_stream(), imageElementByteSize(), _pi_event::make_native(), _pi_mem::mem_, _pi_mem::mem_type_, PI_COMMAND_TYPE_IMAGE_COPY, _pi_mem::surface, and _pi_mem::mem_::surface_mem_.
Referenced by piPluginInit().
pi_result hip_piEnqueueMemImageFill | ( | pi_queue | command_queue, |
pi_mem | image, | ||
const void * | fill_color, | ||
const size_t * | origin, | ||
const size_t * | region, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
\TODO Not implemented in HIP.
Definition at line 4963 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piEnqueueMemImageRead | ( | pi_queue | command_queue, |
pi_mem | image, | ||
pi_bool | blocking_read, | ||
const size_t * | origin, | ||
const size_t * | region, | ||
size_t | row_pitch, | ||
size_t | slice_pitch, | ||
void * | ptr, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Definition at line 4755 of file pi_hip.cpp.
References commonEnqueueMemImageNDCopy(), _pi_queue::get_context(), _pi_queue::get_next_transfer_stream(), imageElementByteSize(), _pi_event::make_native(), PI_COMMAND_TYPE_IMAGE_READ, and _pi_mem::surface.
Referenced by piPluginInit().
pi_result hip_piEnqueueMemImageWrite | ( | pi_queue | command_queue, |
pi_mem | image, | ||
pi_bool | blocking_write, | ||
const size_t * | origin, | ||
const size_t * | region, | ||
size_t | input_row_pitch, | ||
size_t | input_slice_pitch, | ||
const void * | ptr, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Definition at line 4823 of file pi_hip.cpp.
References commonEnqueueMemImageNDCopy(), _pi_queue::get_context(), _pi_queue::get_next_transfer_stream(), imageElementByteSize(), _pi_event::make_native(), PI_COMMAND_TYPE_IMAGE_WRITE, and _pi_mem::surface.
Referenced by piPluginInit().
pi_result hip_piEnqueueMemUnmap | ( | pi_queue | command_queue, |
pi_mem | memobj, | ||
void * | mapped_ptr, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Implements the unmap from the host, using a BufferWrite operation.
Requires the mapped pointer to be already registered in the given memobj. If memobj uses pinned host memory, this will not do a write.
Definition at line 5048 of file pi_hip.cpp.
References _pi_mem::mem_::buffer_mem_::alloc_host_ptr, _pi_mem::mem_::buffer_mem_::allocMode_, _pi_mem::buffer, _pi_mem::mem_::buffer_mem_, _pi_queue::get_context(), _pi_mem::mem_::buffer_mem_::get_map_flags(), _pi_mem::mem_::buffer_mem_::get_map_offset(), _pi_mem::mem_::buffer_mem_::get_map_ptr(), _pi_queue::get_next_transfer_stream(), _pi_mem::mem_::buffer_mem_::get_size(), hip_piEnqueueEventsWait(), hip_piEnqueueMemBufferWrite(), _pi_event::make_native(), _pi_mem::mem_, _pi_mem::mem_type_, PI_COMMAND_TYPE_MEM_BUFFER_UNMAP, PI_MAP_WRITE, PI_MAP_WRITE_INVALIDATE_REGION, and _pi_mem::mem_::buffer_mem_::unmap().
Referenced by piPluginInit().
pi_result hip_piEnqueueNativeKernel | ( | pi_queue | queue, |
void(*)(void *) | user_func, | ||
void * | args, | ||
size_t | cb_args, | ||
pi_uint32 | num_mem_objects, | ||
const pi_mem * | mem_list, | ||
const void ** | args_mem_loc, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
\TODO Not implemented
Definition at line 3165 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piEventCreate | ( | pi_context | context, |
pi_event * | event | ||
) |
Definition at line 3903 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piEventGetInfo | ( | pi_event | event, |
pi_event_info | param_name, | ||
size_t | param_value_size, | ||
void * | param_value, | ||
size_t * | param_value_size_ret | ||
) |
Definition at line 3910 of file pi_hip.cpp.
References __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME, getInfo(), PI_EVENT_INFO_COMMAND_EXECUTION_STATUS, PI_EVENT_INFO_COMMAND_QUEUE, PI_EVENT_INFO_COMMAND_TYPE, PI_EVENT_INFO_CONTEXT, and PI_EVENT_INFO_REFERENCE_COUNT.
Referenced by piPluginInit().
pi_result hip_piEventGetProfilingInfo | ( | pi_event | event, |
pi_profiling_info | param_name, | ||
size_t | param_value_size, | ||
void * | param_value, | ||
size_t * | param_value_size_ret | ||
) |
Obtain profiling information from PI HIP events Timings from HIP are only elapsed time.
Definition at line 3941 of file pi_hip.cpp.
References __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME, sycl::_V1::detail::pi::die(), PI_PROFILING_INFO_COMMAND_END, PI_PROFILING_INFO_COMMAND_QUEUED, PI_PROFILING_INFO_COMMAND_START, PI_PROFILING_INFO_COMMAND_SUBMIT, PI_QUEUE_FLAG_PROFILING_ENABLE, and _pi_queue::properties_.
Referenced by piPluginInit().
Definition at line 4005 of file pi_hip.cpp.
References sycl::_V1::detail::pi::assertion().
Referenced by piPluginInit().
Definition at line 3994 of file pi_hip.cpp.
References sycl::_V1::detail::pi::assertion().
Referenced by piPluginInit().
pi_result hip_piEventSetCallback | ( | pi_event | event, |
pi_int32 | command_exec_callback_type, | ||
pfn_notify | notify, | ||
void * | user_data | ||
) |
Definition at line 3974 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
Definition at line 3986 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
Definition at line 2856 of file pi_hip.cpp.
References _pi_event::get_context().
Referenced by piPluginInit().
pi_result hip_piextContextCreateWithNativeHandle | ( | pi_native_handle | nativeHandle, |
pi_uint32 | num_devices, | ||
const pi_device * | devices, | ||
bool | ownNativeHandle, | ||
pi_context * | context | ||
) |
Created a PI context object from a HIP context handle.
TODO: Implement this. NOTE: The created PI object takes ownership of the native handle.
[in] | nativeHandle | The native handle to create PI context object from. |
[out] | context | Set to the PI context object created from native handle. |
Definition at line 2227 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piextContextGetNativeHandle | ( | pi_context | context, |
pi_native_handle * | nativeHandle | ||
) |
Gets the native HIP handle of a PI context object.
[in] | context | The PI context to get the native HIP object of. |
[out] | nativeHandle | Set to the native handle of the PI context object. |
Definition at line 2213 of file pi_hip.cpp.
References _pi_context::get().
Referenced by piPluginInit().
pi_result hip_piextContextSetExtendedDeleter | ( | pi_context | context, |
pi_context_extended_deleter | function, | ||
void * | user_data | ||
) |
Definition at line 1059 of file pi_hip.cpp.
References _pi_context::set_extended_deleter().
Referenced by piPluginInit().
pi_result hip_piextDeviceCreateWithNativeHandle | ( | pi_native_handle | nativeHandle, |
pi_platform | platform, | ||
pi_device * | device | ||
) |
Created a PI device object from a HIP device handle.
TODO: Implement this. NOTE: The created PI object takes ownership of the native handle.
[in] | nativeHandle | The native handle to create PI device object from. |
[in] | platform | is the PI platform of the device. |
[out] | device | Set to the PI device object created from native handle. |
Definition at line 2046 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piextDeviceGetNativeHandle | ( | pi_device | device, |
pi_native_handle * | nativeHandle | ||
) |
Gets the native HIP handle of a PI device object.
[in] | device | The PI device to get the native HIP object of. |
[out] | nativeHandle | Set to the native handle of the PI device object. |
Definition at line 2031 of file pi_hip.cpp.
Referenced by piPluginInit().
pi_result hip_piextDeviceSelectBinary | ( | pi_device | device, |
pi_device_binary * | binaries, | ||
pi_uint32 | num_binaries, | ||
pi_uint32 * | selected_binary | ||
) |
Definition at line 1082 of file pi_hip.cpp.
References __SYCL_PI_DEVICE_BINARY_TARGET_AMDGCN, __SYCL_PI_DEVICE_BINARY_TARGET_NVPTX64, and sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piextEnqueueDeviceGlobalVariableRead | ( | pi_queue | queue, |
pi_program | program, | ||
const char * | name, | ||
pi_bool | blocking_read, | ||
size_t | count, | ||
size_t | offset, | ||
void * | dst, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Definition at line 5521 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piextEnqueueDeviceGlobalVariableWrite | ( | pi_queue | queue, |
pi_program | program, | ||
const char * | name, | ||
pi_bool | blocking_write, | ||
size_t | count, | ||
size_t | offset, | ||
const void * | src, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
Definition at line 5500 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piextEnqueueReadHostPipe | ( | pi_queue | queue, |
pi_program | program, | ||
const char * | pipe_symbol, | ||
pi_bool | blocking, | ||
void * | ptr, | ||
size_t | size, | ||
pi_uint32 | num_events_in_waitlist, | ||
const pi_event * | events_waitlist, | ||
pi_event * | event | ||
) |
Host Pipes.
Definition at line 5541 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piextEnqueueWriteHostPipe | ( | pi_queue | queue, |
pi_program | program, | ||
const char * | pipe_symbol, | ||
pi_bool | blocking, | ||
void * | ptr, | ||
size_t | size, | ||
pi_uint32 | num_events_in_waitlist, | ||
const pi_event * | events_waitlist, | ||
pi_event * | event | ||
) |
Definition at line 5561 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piextEventCreateWithNativeHandle | ( | pi_native_handle | nativeHandle, |
pi_context | context, | ||
bool | ownNativeHandle, | ||
pi_event * | event | ||
) |
Created a PI event object from a HIP event handle.
TODO: Implement this. NOTE: The created PI object takes ownership of the native handle.
[in] | nativeHandle | The native handle to create PI event object from. |
[out] | event | Set to the PI event object created from native handle. |
Definition at line 4146 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piextEventGetNativeHandle | ( | pi_event | event, |
pi_native_handle * | nativeHandle | ||
) |
Gets the native HIP handle of a PI event object.
[in] | event | The PI event to get the native HIP object of. |
[out] | nativeHandle | Set to the native handle of the PI event object. |
Definition at line 4132 of file pi_hip.cpp.
Referenced by piPluginInit().
pi_result hip_piextGetDeviceFunctionPointer | ( | [[maybe_unused] ] pi_device | device, |
pi_program | program, | ||
const char * | func_name, | ||
pi_uint64 * | func_pointer_ret | ||
) |
Definition at line 1115 of file pi_hip.cpp.
References _pi_program::get(), _pi_program::get_context(), and _pi_context::get_device().
Referenced by piPluginInit().
pi_result hip_piextKernelSetArgMemObj | ( | pi_kernel | kernel, |
pi_uint32 | arg_index, | ||
const pi_mem * | arg_value | ||
) |
Definition at line 2948 of file pi_hip.cpp.
References _pi_mem::mem_::buffer_mem_, sycl::_V1::detail::pi::die(), _pi_mem::mem_::surface_mem_::get_array(), _pi_mem::mem_::surface_mem_::get_surface(), _pi_mem::mem_::buffer_mem_::get_void(), _pi_mem::mem_, _pi_mem::mem_type_, _pi_mem::surface, and _pi_mem::mem_::surface_mem_.
Referenced by piPluginInit().
pi_result hip_piextKernelSetArgPointer | ( | pi_kernel | kernel, |
pi_uint32 | arg_index, | ||
size_t | arg_size, | ||
const void * | arg_value | ||
) |
Definition at line 3894 of file pi_hip.cpp.
Referenced by piPluginInit().
pi_result hip_piextKernelSetArgSampler | ( | pi_kernel | kernel, |
pi_uint32 | arg_index, | ||
const pi_sampler * | arg_value | ||
) |
Definition at line 2991 of file pi_hip.cpp.
Referenced by piPluginInit().
pi_result hip_piextMemCreateWithNativeHandle | ( | pi_native_handle | nativeHandle, |
pi_context | context, | ||
bool | ownNativeHandle, | ||
pi_mem * | mem | ||
) |
Created a PI mem object from a HIP mem handle.
TODO: Implement this. NOTE: The created PI object takes ownership of the native handle.
[in] | nativeHandle | The native handle to create PI mem object from. |
[in] | context | The PI context of the memory allocation. |
[in] | ownNativeHandle | Indicates if we own the native memory handle or it came from interop that asked to not transfer the ownership to SYCL RT. |
[out] | mem | Set to the PI mem object created from native handle. |
Definition at line 2512 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piextMemGetNativeHandle | ( | pi_mem | mem, |
pi_native_handle * | nativeHandle | ||
) |
Gets the native HIP handle of a PI mem object.
[in] | mem | The PI mem to get the native HIP object of. |
[out] | nativeHandle | Set to the native handle of the PI mem object. |
Definition at line 2475 of file pi_hip.cpp.
References _pi_mem::mem_::buffer_mem_, _pi_mem::mem_::buffer_mem_::get(), and _pi_mem::mem_.
Referenced by piPluginInit().
pi_result hip_piextMemImageCreateWithNativeHandle | ( | pi_native_handle | nativeHandle, |
pi_context | context, | ||
bool | ownNativeHandle, | ||
const pi_image_format * | ImageFormat, | ||
const pi_image_desc * | ImageDesc, | ||
pi_mem * | mem | ||
) |
Created a PI image mem object from a HIP image mem handle.
TODO: Implement this. NOTE: The created PI object takes ownership of the native handle.
[in] | nativeHandle | The native handle to create PI mem object from. |
[in] | context | The PI context of the memory allocation. |
[in] | ownNativeHandle | Indicates if we own the native memory handle or it came from interop that asked to not transfer the ownership to SYCL RT. |
[in] | ImageFormat | The format of the image. |
[in] | ImageDesc | The description information for the image. |
[out] | mem | Set to the PI mem object created from native handle. |
Definition at line 2539 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
pi_result hip_piextProgramCreateWithNativeHandle | ( | pi_native_handle | nativeHandle, |
pi_context | context, | ||
bool | ownNativeHandle, | ||
pi_program * | program | ||
) |
Created a PI program object from a HIP program handle.
TODO: Implement this. NOTE: The created PI object takes ownership of the native handle.
[in] | nativeHandle | The native handle to create PI program object from. |
[in] | context | The PI context of the program. |
[in] | ownNativeHandle | tells if should assume the ownership of the native handle. |
[out] | program | Set to the PI program object created from native handle. |
Definition at line 3643 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piextProgramGetNativeHandle | ( | pi_program | program, |
pi_native_handle * | nativeHandle | ||
) |
Gets the native HIP handle of a PI program object.
[in] | program | The PI program to get the native HIP object of. |
[out] | nativeHandle | Set to the native handle of the PI program object. |
Definition at line 3626 of file pi_hip.cpp.
References _pi_program::get().
Referenced by piPluginInit().
pi_result hip_piextProgramSetSpecializationConstant | ( | pi_program | , |
pi_uint32 | , | ||
size_t | , | ||
const void * | |||
) |
Definition at line 3886 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piextQueueCreate | ( | pi_context | Context, |
pi_device | Device, | ||
pi_queue_properties * | Properties, | ||
pi_queue * | Queue | ||
) |
Definition at line 2597 of file pi_hip.cpp.
References hip_piQueueCreate(), and PI_QUEUE_FLAGS.
Referenced by piPluginInit().
pi_result hip_piextQueueCreateWithNativeHandle | ( | pi_native_handle | nativeHandle, |
int32_t | NativeHandleDesc, | ||
pi_context | context, | ||
pi_device | device, | ||
bool | ownNativeHandle, | ||
pi_queue_properties * | Properties, | ||
pi_queue * | queue | ||
) |
Created a PI queue object from a HIP queue handle.
TODO: Implement this. NOTE: The created PI object takes ownership of the native handle.
[in] | nativeHandle | The native handle to create PI queue object from. |
[in] | context | is the PI context of the queue. |
[out] | queue | Set to the PI queue object created from native handle. |
ownNativeHandle | tells if SYCL RT should assume the ownership of the native handle, if it can. |
Definition at line 2749 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piextQueueGetNativeHandle | ( | pi_queue | queue, |
pi_native_handle * | nativeHandle, | ||
int32_t * | NativeHandleDesc | ||
) |
Gets the native HIP handle of a PI queue object.
[in] | queue | The PI queue to get the native HIP object of. |
[out] | nativeHandle | Set to the native handle of the PI queue object. |
Definition at line 2727 of file pi_hip.cpp.
References _pi_queue::get_context(), and _pi_queue::get_next_compute_stream().
Referenced by piPluginInit().
pi_result hip_piextUSMDeviceAlloc | ( | void ** | result_ptr, |
pi_context | context, | ||
[[maybe_unused] ] pi_device | device, | ||
[[maybe_unused] ] pi_usm_mem_properties * | properties, | ||
size_t | size, | ||
[[maybe_unused] ] pi_uint32 | alignment | ||
) |
USM: Implements USM device allocations using a normal HIP device pointer.
Definition at line 5126 of file pi_hip.cpp.
References sycl::_V1::ext::oneapi::experimental::alignment.
Referenced by piPluginInit().
pi_result hip_piextUSMEnqueueFill2D | ( | pi_queue | , |
void * | , | ||
size_t | , | ||
size_t | , | ||
const void * | , | ||
size_t | , | ||
size_t | , | ||
pi_uint32 | , | ||
const pi_event * | , | ||
pi_event * | |||
) |
Definition at line 5334 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piextUSMEnqueueMemAdvise | ( | pi_queue | queue, |
[[maybe_unused] ] const void * | ptr, | ||
size_t | length, | ||
pi_mem_advice | advice, | ||
pi_event * | event | ||
) |
USM: memadvise API to govern behavior of automatic migration mechanisms.
Definition at line 5316 of file pi_hip.cpp.
References hip_piEnqueueEventsWait().
Referenced by piPluginInit().
pi_result hip_piextUSMEnqueueMemcpy | ( | pi_queue | queue, |
pi_bool | blocking, | ||
void * | dst_ptr, | ||
const void * | src_ptr, | ||
size_t | size, | ||
pi_uint32 | num_events_in_waitlist, | ||
const pi_event * | events_waitlist, | ||
pi_event * | event | ||
) |
Definition at line 5238 of file pi_hip.cpp.
References _pi_queue::get_context(), _pi_queue::get_next_transfer_stream(), _pi_event::make_native(), and PI_COMMAND_TYPE_MEM_BUFFER_COPY.
Referenced by piPluginInit().
pi_result hip_piextUSMEnqueueMemcpy2D | ( | pi_queue | queue, |
pi_bool | blocking, | ||
void * | dst_ptr, | ||
size_t | dst_pitch, | ||
const void * | src_ptr, | ||
size_t | src_pitch, | ||
size_t | width, | ||
size_t | height, | ||
pi_uint32 | num_events_in_wait_list, | ||
const pi_event * | event_wait_list, | ||
pi_event * | event | ||
) |
2D Memcpy API
queue | is the queue to submit to |
blocking | is whether this operation should block the host |
dst_ptr | is the location the data will be copied |
dst_pitch | is the total width of the destination memory including padding |
src_ptr | is the data to be copied |
dst_pitch | is the total width of the source memory including padding |
width | is width in bytes of each row to be copied |
height | is height the columns to be copied |
num_events_in_waitlist | is the number of events to wait on |
events_waitlist | is an array of events to wait on |
event | is the event that represents this operation |
Definition at line 5364 of file pi_hip.cpp.
References _pi_queue::get_context(), _pi_queue::get_next_transfer_stream(), _pi_event::make_native(), and PI_COMMAND_TYPE_MEM_BUFFER_COPY_RECT.
Referenced by piPluginInit().
pi_result hip_piextUSMEnqueueMemset | ( | pi_queue | queue, |
void * | ptr, | ||
pi_int32 | value, | ||
size_t | count, | ||
pi_uint32 | num_events_in_waitlist, | ||
const pi_event * | events_waitlist, | ||
pi_event * | event | ||
) |
Definition at line 5200 of file pi_hip.cpp.
References _pi_queue::get_context(), _pi_queue::get_next_compute_stream(), _pi_event::make_native(), and PI_COMMAND_TYPE_MEM_BUFFER_FILL.
Referenced by piPluginInit().
pi_result hip_piextUSMEnqueueMemset2D | ( | pi_queue | , |
void * | , | ||
size_t | , | ||
int | , | ||
size_t | , | ||
size_t | , | ||
pi_uint32 | , | ||
const pi_event * | , | ||
pi_event * | |||
) |
Definition at line 5343 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piextUSMEnqueuePrefetch | ( | pi_queue | queue, |
const void * | ptr, | ||
size_t | size, | ||
pi_usm_migration_flags | flags, | ||
pi_uint32 | num_events_in_waitlist, | ||
const pi_event * | events_waitlist, | ||
pi_event * | event | ||
) |
Definition at line 5278 of file pi_hip.cpp.
References _pi_device::get(), _pi_queue::get_context(), _pi_context::get_device(), _pi_queue::get_next_transfer_stream(), _pi_event::make_native(), and PI_COMMAND_TYPE_MEM_BUFFER_COPY.
Referenced by piPluginInit().
pi_result hip_piextUSMFree | ( | pi_context | context, |
void * | ptr | ||
) |
USM: Frees the given USM pointer associated with the context.
Definition at line 5176 of file pi_hip.cpp.
Referenced by piPluginInit().
pi_result hip_piextUSMGetMemAllocInfo | ( | pi_context | context, |
const void * | ptr, | ||
pi_mem_alloc_info | param_name, | ||
size_t | param_value_size, | ||
void * | param_value, | ||
size_t * | param_value_size_ret | ||
) |
API to query information about USM allocated pointers Valid Queries: PI_MEM_ALLOC_TYPE returns host/device/shared pi_host_usm value PI_MEM_ALLOC_BASE_PTR returns the base ptr of an allocation if the queried pointer fell inside an allocation.
Result must fit in void * PI_MEM_ALLOC_SIZE returns how big the queried pointer's allocation is in bytes. Result is a size_t. PI_MEM_ALLOC_DEVICE returns the pi_device this was allocated against
context | is the pi_context |
ptr | is the pointer to query |
param_name | is the type of query to perform |
param_value_size | is the size of the result in bytes |
param_value | is the result |
param_value_ret | is how many bytes were written |
Definition at line 5419 of file pi_hip.cpp.
References getInfo(), hip_piPlatformsGet(), PI_MEM_ALLOC_BASE_PTR, PI_MEM_ALLOC_DEVICE, PI_MEM_ALLOC_SIZE, PI_MEM_ALLOC_TYPE, PI_MEM_TYPE_DEVICE, PI_MEM_TYPE_HOST, PI_MEM_TYPE_SHARED, and PI_MEM_TYPE_UNKNOWN.
Referenced by piPluginInit().
pi_result hip_piextUSMHostAlloc | ( | void ** | result_ptr, |
pi_context | context, | ||
[[maybe_unused] ] pi_usm_mem_properties * | properties, | ||
size_t | size, | ||
[[maybe_unused] ] pi_uint32 | alignment | ||
) |
USM: Implements USM Host allocations using HIP Pinned Memory.
Definition at line 5103 of file pi_hip.cpp.
References sycl::_V1::ext::oneapi::experimental::alignment.
Referenced by piPluginInit().
pi_result hip_piextUSMSharedAlloc | ( | void ** | result_ptr, |
pi_context | context, | ||
[[maybe_unused] ] pi_device | device, | ||
[[maybe_unused] ] pi_usm_mem_properties * | properties, | ||
size_t | size, | ||
[[maybe_unused] ] pi_uint32 | alignment | ||
) |
USM: Implements USM Shared allocations using HIP Managed Memory.
Definition at line 5151 of file pi_hip.cpp.
References sycl::_V1::ext::oneapi::experimental::alignment.
Referenced by piPluginInit().
pi_result hip_piGetDeviceAndHostTimer | ( | pi_device | Device, |
uint64_t * | DeviceTime, | ||
uint64_t * | HostTime | ||
) |
Definition at line 5591 of file pi_hip.cpp.
References _pi_platform::evBase_.
Referenced by piPluginInit().
pi_result hip_piKernelCreate | ( | pi_program | program, |
const char * | kernel_name, | ||
pi_kernel * | kernel | ||
) |
Definition at line 2891 of file pi_hip.cpp.
References _pi_program::get(), and _pi_program::get_context().
Referenced by piPluginInit().
pi_result hip_piKernelGetGroupInfo | ( | pi_kernel | kernel, |
pi_device | device, | ||
pi_kernel_group_info | param_name, | ||
size_t | param_value_size, | ||
void * | param_value, | ||
size_t * | param_value_size_ret | ||
) |
Definition at line 3693 of file pi_hip.cpp.
References __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME, sycl::_V1::detail::pi::assertion(), sycl::_V1::detail::pi::die(), getInfo(), getInfoArray(), PI_KERNEL_GROUP_INFO_COMPILE_WORK_GROUP_SIZE, PI_KERNEL_GROUP_INFO_GLOBAL_WORK_SIZE, PI_KERNEL_GROUP_INFO_LOCAL_MEM_SIZE, PI_KERNEL_GROUP_INFO_NUM_REGS, PI_KERNEL_GROUP_INFO_PREFERRED_WORK_GROUP_SIZE_MULTIPLE, PI_KERNEL_GROUP_INFO_PRIVATE_MEM_SIZE, and PI_KERNEL_GROUP_INFO_WORK_GROUP_SIZE.
Referenced by piPluginInit().
pi_result hip_piKernelGetInfo | ( | pi_kernel | kernel, |
pi_kernel_info | param_name, | ||
size_t | param_value_size, | ||
void * | param_value, | ||
size_t * | param_value_size_ret | ||
) |
Definition at line 3657 of file pi_hip.cpp.
References __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME, getInfo(), PI_KERNEL_INFO_ATTRIBUTES, PI_KERNEL_INFO_CONTEXT, PI_KERNEL_INFO_FUNCTION_NAME, PI_KERNEL_INFO_NUM_ARGS, PI_KERNEL_INFO_PROGRAM, and PI_KERNEL_INFO_REFERENCE_COUNT.
Referenced by piPluginInit().
pi_result hip_piKernelGetSubGroupInfo | ( | pi_kernel | kernel, |
pi_device | device, | ||
pi_kernel_sub_group_info | param_name, | ||
size_t | input_value_size, | ||
const void * | input_value, | ||
size_t | param_value_size, | ||
void * | param_value, | ||
size_t * | param_value_size_ret | ||
) |
Definition at line 3795 of file pi_hip.cpp.
References __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME, sycl::_V1::detail::pi::assertion(), getInfo(), PI_KERNEL_COMPILE_NUM_SUB_GROUPS, PI_KERNEL_COMPILE_SUB_GROUP_SIZE_INTEL, PI_KERNEL_MAX_NUM_SUB_GROUPS, and PI_KERNEL_MAX_SUB_GROUP_SIZE.
Referenced by piPluginInit().
Definition at line 3855 of file pi_hip.cpp.
Referenced by piPluginInit().
Definition at line 3847 of file pi_hip.cpp.
Referenced by piPluginInit().
pi_result hip_piKernelSetArg | ( | pi_kernel | kernel, |
pi_uint32 | arg_index, | ||
size_t | arg_size, | ||
const void * | arg_value | ||
) |
Definition at line 2931 of file pi_hip.cpp.
Referenced by piPluginInit().
pi_result hip_piKernelSetExecInfo | ( | pi_kernel | kernel, |
pi_kernel_exec_info | param_name, | ||
size_t | param_value_size, | ||
const void * | param_value | ||
) |
Definition at line 3874 of file pi_hip.cpp.
Referenced by piPluginInit().
pi_result hip_piMemBufferCreate | ( | pi_context | context, |
pi_mem_flags | flags, | ||
size_t | size, | ||
void * | host_ptr, | ||
pi_mem * | ret_mem, | ||
[[maybe_unused] ] const pi_mem_properties * | properties | ||
) |
Creates a PI Memory object using a HIP memory allocation.
Can trigger a manual copy depending on the mode. \TODO Implement USE_HOST_PTR using cuHostRegister
Definition at line 2247 of file pi_hip.cpp.
References _pi_mem::mem_::buffer_mem_::alloc_host_ptr, _pi_mem::mem_::buffer_mem_::classic, _pi_mem::mem_::buffer_mem_::copy_in, PI_MEM_FLAGS_HOST_PTR_ALLOC, PI_MEM_FLAGS_HOST_PTR_COPY, PI_MEM_FLAGS_HOST_PTR_USE, and _pi_mem::mem_::buffer_mem_::use_host_ptr.
Referenced by piPluginInit().
pi_result hip_piMemBufferPartition | ( | pi_mem | parent_buffer, |
pi_mem_flags | flags, | ||
[[maybe_unused] ] pi_buffer_create_type | buffer_create_type, | ||
void * | buffer_create_info, | ||
pi_mem * | memObj | ||
) |
Implements a buffer partition in the HIP backend.
A buffer partition (or a sub-buffer, in OpenCL terms) is simply implemented as an offset over an existing HIP allocation.
Definition at line 2392 of file pi_hip.cpp.
References _pi_mem::mem_::buffer_mem_, _pi_mem::mem_::buffer_mem_::classic, _pi_mem::context_, ReleaseGuard< T >::dismiss(), _pi_mem::mem_::buffer_mem_::get_size(), _pi_mem::mem_::buffer_mem_::get_with_offset(), _pi_mem::mem_::buffer_mem_::hostPtr_, _pi_mem::is_buffer(), _pi_mem::is_sub_buffer(), _pi_mem::mem_, PI_BUFFER_CREATE_TYPE_REGION, PI_MEM_FLAGS_ACCESS_RW, and _pi_mem::mem_::buffer_mem_::ptr_.
Referenced by piPluginInit().
pi_result hip_piMemGetInfo | ( | pi_mem | memObj, |
pi_mem_info | queriedInfo, | ||
size_t | expectedQuerySize, | ||
void * | queryOutput, | ||
size_t * | writtenQuerySize | ||
) |
Definition at line 2457 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piMemImageCreate | ( | pi_context | context, |
pi_mem_flags | flags, | ||
const pi_image_format * | image_format, | ||
const pi_image_desc * | image_desc, | ||
void * | host_ptr, | ||
pi_mem * | ret_mem | ||
) |
\TODO Not implemented
Definition at line 3187 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die(), _pi_image_desc::image_depth, _pi_image_desc::image_height, _pi_image_desc::image_type, _pi_image_desc::image_width, PI_IMAGE_CHANNEL_ORDER_RGBA, PI_IMAGE_CHANNEL_TYPE_FLOAT, PI_IMAGE_CHANNEL_TYPE_HALF_FLOAT, PI_IMAGE_CHANNEL_TYPE_SIGNED_INT16, PI_IMAGE_CHANNEL_TYPE_SIGNED_INT32, PI_IMAGE_CHANNEL_TYPE_SIGNED_INT8, PI_IMAGE_CHANNEL_TYPE_UNORM_INT16, PI_IMAGE_CHANNEL_TYPE_UNORM_INT8, PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT16, PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT32, PI_IMAGE_CHANNEL_TYPE_UNSIGNED_INT8, PI_MEM_FLAGS_HOST_PTR_COPY, PI_MEM_FLAGS_HOST_PTR_USE, PI_MEM_TYPE_IMAGE1D, PI_MEM_TYPE_IMAGE2D, and PI_MEM_TYPE_IMAGE3D.
Referenced by piPluginInit().
pi_result hip_piMemImageGetInfo | ( | pi_mem | image, |
pi_image_info | param_name, | ||
size_t | param_value_size, | ||
void * | param_value, | ||
size_t * | param_value_size_ret | ||
) |
\TODO Not implemented
Definition at line 3341 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
Decreases the reference count of the Mem object.
If this is zero, calls the relevant HIP Free function
Definition at line 2325 of file pi_hip.cpp.
References _pi_mem::mem_::buffer_mem_::alloc_host_ptr, _pi_mem::buffer, _pi_mem::mem_::buffer_mem_::classic, _pi_mem::mem_::buffer_mem_::copy_in, _pi_mem::decrement_reference_count(), sycl::_V1::detail::pi::die(), _pi_mem::is_sub_buffer(), _pi_mem::mem_type_, _pi_mem::surface, and _pi_mem::mem_::buffer_mem_::use_host_ptr.
Referenced by piPluginInit(), and _pi_mem::~_pi_mem().
Definition at line 3354 of file pi_hip.cpp.
References _pi_mem::get_reference_count(), and _pi_mem::increment_reference_count().
Referenced by piPluginInit().
pi_result hip_piPlatformGetInfo | ( | [[maybe_unused] ] pi_platform | platform, |
pi_platform_info | param_name, | ||
size_t | param_value_size, | ||
void * | param_value, | ||
size_t * | param_value_size_ret | ||
) |
Definition at line 935 of file pi_hip.cpp.
References __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME, sycl::_V1::detail::pi::die(), getInfo(), PI_EXT_PLATFORM_BACKEND_HIP, PI_EXT_PLATFORM_INFO_BACKEND, PI_PLATFORM_INFO_EXTENSIONS, PI_PLATFORM_INFO_NAME, PI_PLATFORM_INFO_PROFILE, PI_PLATFORM_INFO_VENDOR, and PI_PLATFORM_INFO_VERSION.
Referenced by piPluginInit().
pi_result hip_piPlatformsGet | ( | pi_uint32 | num_entries, |
pi_platform * | platforms, | ||
pi_uint32 * | num_platforms | ||
) |
Obtains the HIP platform.
There is only one HIP platform, and contains all devices on the system. Triggers the HIP Driver initialization (hipInit) the first time, so this must be the first PI API called.
However because multiple devices in a context is not currently supported, place each device in a separate platform.
Definition at line 854 of file pi_hip.cpp.
Referenced by hip_piextUSMGetMemAllocInfo(), and piPluginInit().
pi_result hip_piProgramBuild | ( | pi_program | program, |
[[maybe_unused] ] pi_uint32 | num_devices, | ||
[[maybe_unused] ] const pi_device * | device_list, | ||
const char * | options, | ||
[[maybe_unused] ] void(*)(pi_program program, void *user_data) | pfn_notify, | ||
[[maybe_unused] ] void * | user_data | ||
) |
Loads the images from a PI program into a HIPmodule that can be used later on to extract functions (kernels).
See _pi_program for implementation details.
Definition at line 3382 of file pi_hip.cpp.
References _pi_program::build_program(), and _pi_program::get_context().
Referenced by piPluginInit().
pi_result hip_piProgramCompile | ( | pi_program | program, |
[[maybe_unused] ] pi_uint32 | num_devices, | ||
[[maybe_unused] ] const pi_device * | device_list, | ||
const char * | options, | ||
[[maybe_unused] ] pi_uint32 | num_input_headers, | ||
const pi_program * | input_headers, | ||
const char ** | header_include_names, | ||
[[maybe_unused] ] void(*)(pi_program program, void *user_data) | pfn_notify, | ||
[[maybe_unused] ] void * | user_data | ||
) |
Creates a new program that is the outcome of the compilation of the headers and the program.
\TODO Implement asynchronous compilation
Definition at line 3526 of file pi_hip.cpp.
References _pi_program::build_program(), and _pi_program::get_context().
Referenced by piPluginInit().
pi_result hip_piProgramCreate | ( | pi_context | context, |
const void * | il, | ||
size_t | length, | ||
pi_program * | res_program | ||
) |
\TODO Not implemented
Definition at line 3407 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piProgramCreateWithBinary | ( | pi_context | context, |
[[maybe_unused] ] pi_uint32 | num_devices, | ||
[[maybe_unused] ] const pi_device * | device_list, | ||
const size_t * | lengths, | ||
const unsigned char ** | binaries, | ||
size_t | num_metadata_entries, | ||
const pi_device_binary_property * | metadata, | ||
pi_int32 * | binary_status, | ||
pi_program * | program | ||
) |
Loads images from a list of PTX or HIPBIN binaries.
Note: No calls to HIP driver API in this function, only store binaries for later.
Note: Only supports one device
Definition at line 3424 of file pi_hip.cpp.
References _pi_device::get(), and _pi_context::get_device().
Referenced by piPluginInit().
pi_result hip_piProgramGetBuildInfo | ( | pi_program | program, |
pi_device | device, | ||
pi_program_build_info | param_name, | ||
size_t | param_value_size, | ||
void * | param_value, | ||
size_t * | param_value_size_ret | ||
) |
Definition at line 3555 of file pi_hip.cpp.
References __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME, _pi_program::buildOptions_, _pi_program::buildStatus_, sycl::_V1::detail::pi::die(), getInfo(), getInfoArray(), _pi_program::infoLog_, _pi_program::MAX_LOG_SIZE, PI_PROGRAM_BUILD_INFO_LOG, PI_PROGRAM_BUILD_INFO_OPTIONS, and PI_PROGRAM_BUILD_INFO_STATUS.
Referenced by piPluginInit().
pi_result hip_piProgramGetInfo | ( | pi_program | program, |
pi_program_info | param_name, | ||
size_t | param_value_size, | ||
void * | param_value, | ||
size_t * | param_value_size_ret | ||
) |
Definition at line 3464 of file pi_hip.cpp.
References __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME, _pi_program::binary_, _pi_program::binarySizeInBytes_, _pi_program::context_, _pi_context::deviceId_, sycl::_V1::detail::pi::die(), _pi_program::get_reference_count(), getInfo(), getInfoArray(), getKernelNames(), PI_PROGRAM_INFO_BINARIES, PI_PROGRAM_INFO_BINARY_SIZES, PI_PROGRAM_INFO_CONTEXT, PI_PROGRAM_INFO_DEVICES, PI_PROGRAM_INFO_KERNEL_NAMES, PI_PROGRAM_INFO_NUM_DEVICES, PI_PROGRAM_INFO_REFERENCE_COUNT, and PI_PROGRAM_INFO_SOURCE.
Referenced by piPluginInit().
pi_result hip_piProgramLink | ( | pi_context | context, |
pi_uint32 | num_devices, | ||
const pi_device * | device_list, | ||
const char * | options, | ||
pi_uint32 | num_input_programs, | ||
const pi_program * | input_programs, | ||
void(*)(pi_program program, void *user_data) | pfn_notify, | ||
void * | user_data, | ||
pi_program * | ret_program | ||
) |
Definition at line 3501 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by piPluginInit().
pi_result hip_piProgramRelease | ( | pi_program | program | ) |
Decreases the reference count of a pi_program object.
When the reference count reaches 0, it unloads the module from the context.
Definition at line 3591 of file pi_hip.cpp.
References _pi_program::decrement_reference_count(), _pi_program::get(), _pi_program::get_context(), and _pi_program::get_reference_count().
Referenced by piPluginInit(), and _pi_kernel::~_pi_kernel().
pi_result hip_piProgramRetain | ( | pi_program | program | ) |
Definition at line 3581 of file pi_hip.cpp.
References _pi_program::get_reference_count(), and _pi_program::increment_reference_count().
Referenced by piPluginInit().
pi_result hip_piQueueCreate | ( | pi_context | context, |
pi_device | device, | ||
pi_queue_properties | properties, | ||
pi_queue * | queue | ||
) |
Creates a pi_queue
object on the HIP backend.
Valid properties
Definition at line 2561 of file pi_hip.cpp.
References _pi_queue::default_num_compute_streams, _pi_queue::default_num_transfer_streams, _pi_context::get_device(), and PI_QUEUE_FLAG_OUT_OF_ORDER_EXEC_MODE_ENABLE.
Referenced by hip_piextQueueCreate(), and piPluginInit().
Definition at line 2686 of file pi_hip.cpp.
References _pi_queue::get_context(), and _pi_queue::sync_streams().
Referenced by piPluginInit().
Definition at line 2716 of file pi_hip.cpp.
Referenced by piPluginInit().
pi_result hip_piQueueGetInfo | ( | pi_queue | command_queue, |
pi_queue_info | param_name, | ||
size_t | param_value_size, | ||
void * | param_value, | ||
size_t * | param_value_size_ret | ||
) |
Definition at line 2613 of file pi_hip.cpp.
References __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME, _pi_queue::all_of(), _pi_queue::context_, _pi_queue::device_, sycl::_V1::detail::pi::die(), _pi_queue::get_reference_count(), getInfo(), PI_EXT_ONEAPI_QUEUE_INFO_EMPTY, PI_QUEUE_INFO_CONTEXT, PI_QUEUE_INFO_DEVICE, PI_QUEUE_INFO_PROPERTIES, PI_QUEUE_INFO_REFERENCE_COUNT, and _pi_queue::properties_.
Referenced by piPluginInit().
Definition at line 2661 of file pi_hip.cpp.
References _pi_queue::decrement_reference_count(), _pi_queue::for_each_stream(), and _pi_queue::get_context().
Referenced by piPluginInit().
Definition at line 2653 of file pi_hip.cpp.
References _pi_queue::get_reference_count(), and _pi_queue::increment_reference_count().
Referenced by piPluginInit().
pi_result hip_piSamplerCreate | ( | pi_context | context, |
const pi_sampler_properties * | sampler_properties, | ||
pi_sampler * | result_sampler | ||
) |
Creates a PI sampler object.
[in] | context | The context the sampler is created for. |
[in] | sampler_properties | The properties for the sampler. |
[out] | result_sampler | Set to the resulting sampler object. |
Definition at line 4169 of file pi_hip.cpp.
References PI_SAMPLER_ADDRESSING_MODE_CLAMP, PI_SAMPLER_ADDRESSING_MODE_NONE, PI_SAMPLER_FILTER_MODE_NEAREST, PI_SAMPLER_PROPERTIES_ADDRESSING_MODE, PI_SAMPLER_PROPERTIES_FILTER_MODE, PI_SAMPLER_PROPERTIES_NORMALIZED_COORDS, and PI_TRUE.
Referenced by piPluginInit().
pi_result hip_piSamplerGetInfo | ( | pi_sampler | sampler, |
pi_sampler_info | param_name, | ||
size_t | param_value_size, | ||
void * | param_value, | ||
size_t * | param_value_size_ret | ||
) |
Gets information from a PI sampler object.
[in] | sampler | The sampler to get the information from. |
[in] | param_name | The name of the information to get. |
[in] | param_value_size | The size of the param_value. |
[out] | param_value | Set to information value. |
[out] | param_value_size_ret | Set to the size of the information value. |
Definition at line 4228 of file pi_hip.cpp.
References __SYCL_PI_HANDLE_UNKNOWN_PARAM_NAME, _pi_sampler::context_, _pi_sampler::get_reference_count(), getInfo(), PI_SAMPLER_ADDRESSING_MODE_NONE, PI_SAMPLER_FILTER_MODE_NEAREST, PI_SAMPLER_INFO_ADDRESSING_MODE, PI_SAMPLER_INFO_CONTEXT, PI_SAMPLER_INFO_FILTER_MODE, PI_SAMPLER_INFO_NORMALIZED_COORDS, PI_SAMPLER_INFO_REFERENCE_COUNT, and _pi_sampler::props_.
Referenced by piPluginInit().
pi_result hip_piSamplerRelease | ( | pi_sampler | sampler | ) |
Releases a PI sampler object, decrementing its reference count.
If the reference count reaches zero, the sampler object is destroyed.
[in] | sampler | The sampler to decrement the reference count of. |
Definition at line 4281 of file pi_hip.cpp.
References sycl::_V1::detail::pi::assertion(), _pi_sampler::decrement_reference_count(), and _pi_sampler::get_reference_count().
Referenced by piPluginInit().
pi_result hip_piSamplerRetain | ( | pi_sampler | sampler | ) |
Retains a PI sampler object, incrementing its reference count.
[in] | sampler | The sampler to increment the reference count of. |
Definition at line 4269 of file pi_hip.cpp.
References _pi_sampler::increment_reference_count().
Referenced by piPluginInit().
pi_result hip_piTearDown | ( | void * | PluginParameter | ) |
Definition at line 5586 of file pi_hip.cpp.
Referenced by piPluginInit().
|
static |
Definition at line 4661 of file pi_hip.cpp.
References sycl::_V1::detail::pi::die().
Referenced by hip_piEnqueueMemImageCopy(), hip_piEnqueueMemImageRead(), and hip_piEnqueueMemImageWrite().
Definition at line 5624 of file pi_hip.cpp.
References _PI_CL, _PI_PLUGIN_VERSION_CHECK, hip_piclProgramCreateWithSource(), hip_piContextCreate(), hip_piContextGetInfo(), hip_piContextRelease(), hip_piContextRetain(), hip_piDeviceGetInfo(), hip_piDevicePartition(), hip_piDeviceRelease(), hip_piDeviceRetain(), hip_piDevicesGet(), hip_piEnqueueEventsWait(), hip_piEnqueueEventsWaitWithBarrier(), hip_piEnqueueKernelLaunch(), hip_piEnqueueMemBufferCopy(), hip_piEnqueueMemBufferCopyRect(), hip_piEnqueueMemBufferFill(), hip_piEnqueueMemBufferMap(), hip_piEnqueueMemBufferRead(), hip_piEnqueueMemBufferReadRect(), hip_piEnqueueMemBufferWrite(), hip_piEnqueueMemBufferWriteRect(), hip_piEnqueueMemImageCopy(), hip_piEnqueueMemImageFill(), hip_piEnqueueMemImageRead(), hip_piEnqueueMemImageWrite(), hip_piEnqueueMemUnmap(), hip_piEnqueueNativeKernel(), hip_piEventCreate(), hip_piEventGetInfo(), hip_piEventGetProfilingInfo(), hip_piEventRelease(), hip_piEventRetain(), hip_piEventSetCallback(), hip_piEventSetStatus(), hip_piEventsWait(), hip_piextContextCreateWithNativeHandle(), hip_piextContextGetNativeHandle(), hip_piextContextSetExtendedDeleter(), hip_piextDeviceCreateWithNativeHandle(), hip_piextDeviceGetNativeHandle(), hip_piextDeviceSelectBinary(), hip_piextEnqueueDeviceGlobalVariableRead(), hip_piextEnqueueDeviceGlobalVariableWrite(), hip_piextEnqueueReadHostPipe(), hip_piextEnqueueWriteHostPipe(), hip_piextEventCreateWithNativeHandle(), hip_piextEventGetNativeHandle(), hip_piextGetDeviceFunctionPointer(), hip_piextKernelSetArgMemObj(), hip_piextKernelSetArgPointer(), hip_piextKernelSetArgSampler(), hip_piextMemCreateWithNativeHandle(), hip_piextMemGetNativeHandle(), hip_piextProgramCreateWithNativeHandle(), hip_piextProgramGetNativeHandle(), hip_piextProgramSetSpecializationConstant(), hip_piextQueueCreate(), hip_piextQueueCreateWithNativeHandle(), hip_piextQueueGetNativeHandle(), hip_piextUSMDeviceAlloc(), hip_piextUSMEnqueueFill2D(), hip_piextUSMEnqueueMemAdvise(), hip_piextUSMEnqueueMemcpy(), hip_piextUSMEnqueueMemcpy2D(), hip_piextUSMEnqueueMemset(), hip_piextUSMEnqueueMemset2D(), hip_piextUSMEnqueuePrefetch(), hip_piextUSMFree(), hip_piextUSMGetMemAllocInfo(), hip_piextUSMHostAlloc(), hip_piextUSMSharedAlloc(), hip_piGetDeviceAndHostTimer(), hip_piKernelCreate(), hip_piKernelGetGroupInfo(), hip_piKernelGetInfo(), hip_piKernelGetSubGroupInfo(), hip_piKernelRelease(), hip_piKernelRetain(), hip_piKernelSetArg(), hip_piKernelSetExecInfo(), hip_piMemBufferCreate(), hip_piMemBufferPartition(), hip_piMemGetInfo(), hip_piMemImageCreate(), hip_piMemImageGetInfo(), hip_piMemRelease(), hip_piMemRetain(), hip_piPlatformGetInfo(), hip_piPlatformsGet(), hip_piProgramBuild(), hip_piProgramCompile(), hip_piProgramCreate(), hip_piProgramCreateWithBinary(), hip_piProgramGetBuildInfo(), hip_piProgramGetInfo(), hip_piProgramLink(), hip_piProgramRelease(), hip_piProgramRetain(), hip_piQueueCreate(), hip_piQueueFinish(), hip_piQueueFlush(), hip_piQueueGetInfo(), hip_piQueueRelease(), hip_piQueueRetain(), hip_piSamplerCreate(), hip_piSamplerGetInfo(), hip_piSamplerRelease(), hip_piSamplerRetain(), hip_piTearDown(), piclProgramCreateWithSource(), piContextCreate(), piContextGetInfo(), piContextRelease(), piContextRetain(), piDeviceGetInfo(), piDevicePartition(), piDeviceRelease(), piDeviceRetain(), piDevicesGet(), piEnqueueEventsWait(), piEnqueueEventsWaitWithBarrier(), piEnqueueKernelLaunch(), piEnqueueMemBufferCopy(), piEnqueueMemBufferCopyRect(), piEnqueueMemBufferFill(), piEnqueueMemBufferMap(), piEnqueueMemBufferRead(), piEnqueueMemBufferReadRect(), piEnqueueMemBufferWrite(), piEnqueueMemBufferWriteRect(), piEnqueueMemImageCopy(), piEnqueueMemImageFill(), piEnqueueMemImageRead(), piEnqueueMemImageWrite(), piEnqueueMemUnmap(), piEnqueueNativeKernel(), piEventCreate, piEventGetInfo(), piEventGetProfilingInfo(), piEventRelease(), piEventRetain(), piEventSetCallback(), piEventSetStatus(), piEventsWait(), piextContextCreateWithNativeHandle(), piextContextGetNativeHandle(), piextContextSetExtendedDeleter(), piextDeviceCreateWithNativeHandle(), piextDeviceGetNativeHandle(), piextDeviceSelectBinary(), piextEnqueueDeviceGlobalVariableRead(), piextEnqueueDeviceGlobalVariableWrite(), piextEnqueueReadHostPipe(), piextEnqueueWriteHostPipe(), piextEventCreateWithNativeHandle(), piextEventGetNativeHandle(), piextGetDeviceFunctionPointer(), piextKernelSetArgMemObj(), piextKernelSetArgPointer(), piextKernelSetArgSampler(), piextMemCreateWithNativeHandle(), piextMemGetNativeHandle(), piextProgramCreateWithNativeHandle(), piextProgramGetNativeHandle(), piextProgramSetSpecializationConstant(), piextQueueCreate(), piextQueueCreateWithNativeHandle(), piextQueueGetNativeHandle(), piextUSMDeviceAlloc(), piextUSMEnqueueFill2D(), piextUSMEnqueueMemAdvise(), piextUSMEnqueueMemcpy(), piextUSMEnqueueMemcpy2D(), piextUSMEnqueueMemset(), piextUSMEnqueueMemset2D(), piextUSMEnqueuePrefetch(), piextUSMFree(), piextUSMGetMemAllocInfo(), piextUSMHostAlloc(), piextUSMSharedAlloc(), _pi_plugin::PiFunctionTable, piGetDeviceAndHostTimer(), piKernelCreate(), piKernelGetGroupInfo(), piKernelGetInfo(), piKernelGetSubGroupInfo(), piKernelRelease(), piKernelRetain(), piKernelSetArg(), piKernelSetExecInfo(), piMemBufferCreate(), piMemBufferPartition(), piMemGetInfo(), piMemImageCreate(), piMemImageGetInfo(), piMemRelease(), piMemRetain(), piPlatformGetInfo(), piPlatformsGet(), piPluginGetBackendOption(), piPluginGetLastError(), piProgramBuild(), piProgramCompile(), piProgramCreate(), piProgramCreateWithBinary(), piProgramGetBuildInfo(), piProgramGetInfo(), piProgramLink(), piProgramRelease(), piProgramRetain(), piQueueCreate(), piQueueFinish(), piQueueFlush(), piQueueGetInfo(), piQueueRelease(), piQueueRetain(), piSamplerCreate(), piSamplerGetInfo(), piSamplerRelease(), piSamplerRetain(), piTearDown(), _pi_plugin::PiVersion, _pi_plugin::PluginVersion, and SupportedVersion.
const char SupportedVersion[] = _PI_HIP_PLUGIN_VERSION_STRING |
Definition at line 5622 of file pi_hip.cpp.
Referenced by piPluginInit().