cubecl_hip_sys

Function hipMemcpyToSymbol

Source
pub unsafe extern "C" fn hipMemcpyToSymbol(
    symbol: *const c_void,
    src: *const c_void,
    sizeBytes: usize,
    offset: usize,
    kind: hipMemcpyKind,
) -> hipError_t
Expand description

@brief Copies data to the given symbol on the device. Symbol HIP APIs allow a kernel to define a device-side data symbol which can be accessed on the host side. The symbol can be in __constant or device space. Note that the symbol name needs to be encased in the HIP_SYMBOL macro. This also applies to hipMemcpyFromSymbol, hipGetSymbolAddress, and hipGetSymbolSize. For detailed usage, see the memcpyToSymbol example in the HIP Porting Guide.

@param[out] symbol pointer to the device symbole @param[in] src pointer to the source address @param[in] sizeBytes size in bytes to copy @param[in] offset offset in bytes from start of symbole @param[in] kind type of memory transfer

@return #hipSuccess, #hipErrorInvalidValue