Loading...
Searching...
No Matches
starpu_hip.h
Go to the documentation of this file.
/* StarPU --- Runtime system for heterogeneous multicore architectures.
*
* Copyright (C) 2010-2024 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
*
* StarPU is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at
* your option) any later version.
*
* StarPU is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
*
* See the GNU Lesser General Public License in COPYING.LGPL for more details.
*/
#ifndef __STARPU_HIP_H__
#define __STARPU_HIP_H__
#include <starpu_config.h>
#ifdef STARPU_USE_HIP
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wundef"
#pragma GCC diagnostic ignored "-Wunused-result"
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#ifndef __cplusplus
#pragma GCC diagnostic ignored "-Wimplicit-int"
#endif
#pragma GCC diagnostic ignored "-Wreturn-type"
#ifdef STARPU_USE_HIPBLAS
#include <hipblas/hipblas.h>
#endif
#include <hip/hip_runtime.h>
#include <hip/hip_runtime_api.h>
#pragma GCC diagnostic pop
#ifdef __cplusplus
extern "C" {
#endif
void starpu_hipblas_report_error(const char *func, const char *file, int line, int status);
#define STARPU_HIPBLAS_REPORT_ERROR(status) starpu_hipblas_report_error(__starpu_func__, __FILE__, __LINE__, status)
void starpu_hip_report_error(const char *func, const char *file, int line, hipError_t status);
#define STARPU_HIP_REPORT_ERROR(status) starpu_hip_report_error(__starpu_func__, __FILE__, __LINE__, status)
hipStream_t starpu_hip_get_local_stream(void);
const struct hipDeviceProp_t *starpu_hip_get_device_properties(unsigned workerid);
int starpu_hip_copy_async_sync(void *src_ptr, unsigned src_node, void *dst_ptr, unsigned dst_node, size_t ssize, hipStream_t stream, hipMemcpyKind kind);
int starpu_hip_copy2d_async_sync(void *src_ptr, unsigned src_node,
void *dst_ptr, unsigned dst_node,
size_t blocksize,
size_t numblocks, size_t ld_src, size_t ld_dst,
hipStream_t stream, hipMemcpyKind kind);
int starpu_hip_copy3d_async_sync(void *src_ptr, unsigned src_node, void *dst_ptr, unsigned dst_node,
size_t blocksize,
size_t numblocks_1, size_t ld1_src, size_t ld1_dst,
size_t numblocks_2, size_t ld2_src, size_t ld2_dst,
hipStream_t stream, hipMemcpyKind kind);
void starpu_hip_set_device(int devid);
#ifdef __cplusplus
}
#endif
#endif /* STARPU_USE_HIP */
#endif /* __STARPU_HIP_H__ */
starpu_hip_copy3d_async_sync
int starpu_hip_copy3d_async_sync(void *src_ptr, unsigned src_node, void *dst_ptr, unsigned dst_node, size_t blocksize, size_t numblocks_1, size_t ld1_src, size_t ld1_dst, size_t numblocks_2, size_t ld2_src, size_t ld2_dst, hipStream_t stream, hipMemcpyKind kind)
starpu_hip_get_device_properties
const struct hipDeviceProp_t * starpu_hip_get_device_properties(unsigned workerid)
starpu_hip_get_local_stream
hipStream_t starpu_hip_get_local_stream(void)
starpu_hip_report_error
void starpu_hip_report_error(const char *func, const char *file, int line, hipError_t status)
starpu_hip_copy_async_sync
int starpu_hip_copy_async_sync(void *src_ptr, unsigned src_node, void *dst_ptr, unsigned dst_node, size_t ssize, hipStream_t stream, hipMemcpyKind kind)
starpu_hip_set_device
void starpu_hip_set_device(int devid)
starpu_hipblas_report_error
void starpu_hipblas_report_error(const char *func, const char *file, int line, int status)
starpu_hip_copy2d_async_sync
int starpu_hip_copy2d_async_sync(void *src_ptr, unsigned src_node, void *dst_ptr, unsigned dst_node, size_t blocksize, size_t numblocks, size_t ld_src, size_t ld_dst, hipStream_t stream, hipMemcpyKind kind)
starpu_config.h