StarPU Handbook - StarPU Applications
Loading...
Searching...
No Matches
starpu_hip.h
Go to the documentation of this file.
1/* StarPU --- Runtime system for heterogeneous multicore architectures.
2 *
3 * Copyright (C) 2010-2022 Université de Bordeaux, CNRS (LaBRI UMR 5800), Inria
4 *
5 * StarPU is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU Lesser General Public License as published by
7 * the Free Software Foundation; either version 2.1 of the License, or (at
8 * your option) any later version.
9 *
10 * StarPU is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 *
14 * See the GNU Lesser General Public License in COPYING.LGPL for more details.
15 */
16#ifndef __STARPU_HIP_H__
17#define __STARPU_HIP_H__
18
19#include <starpu_config.h>
20
21#ifdef STARPU_USE_HIP
22
23#pragma GCC diagnostic push
24#pragma GCC diagnostic ignored "-Wundef"
25#pragma GCC diagnostic ignored "-Wunused-result"
26#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
27#ifndef __cplusplus
28#pragma GCC diagnostic ignored "-Wimplicit-int"
29#endif
30#pragma GCC diagnostic ignored "-Wreturn-type"
31#include <hipblas/hipblas.h>
32#include <hip/hip_runtime.h>
33#include <hip/hip_runtime_api.h>
34#pragma GCC diagnostic pop
35
36#ifdef __cplusplus
37extern "C" {
38#endif
39
48void starpu_hipblas_report_error(const char *func, const char *file, int line, int status);
49
53#define STARPU_HIPBLAS_REPORT_ERROR(status) starpu_hipblas_report_error(__starpu_func__, __FILE__, __LINE__, status)
54
58void starpu_hip_report_error(const char *func, const char *file, int line, hipError_t status);
59
63#define STARPU_HIP_REPORT_ERROR(status) starpu_hip_report_error(__starpu_func__, __FILE__, __LINE__, status)
64
77
82const struct hipDeviceProp_t *starpu_hip_get_device_properties(unsigned workerid);
83
93int 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);
94
108int starpu_hip_copy2d_async_sync(void *src_ptr, unsigned src_node,
109 void *dst_ptr, unsigned dst_node,
110 size_t blocksize,
111 size_t numblocks, size_t ld_src, size_t ld_dst,
112 hipStream_t stream, hipMemcpyKind kind);
113
128int starpu_hip_copy3d_async_sync(void *src_ptr, unsigned src_node, void *dst_ptr, unsigned dst_node,
129 size_t blocksize,
130 size_t numblocks_1, size_t ld1_src, size_t ld1_dst,
131 size_t numblocks_2, size_t ld2_src, size_t ld2_dst,
132 hipStream_t stream, hipMemcpyKind kind);
133
137void starpu_hip_set_device(unsigned devid);
138
141#ifdef __cplusplus
142}
143#endif
144
145#endif /* STARPU_USE_HIP */
146#endif /* __STARPU_HIP_H__ */
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)
const struct hipDeviceProp_t * starpu_hip_get_device_properties(unsigned workerid)
void starpu_hip_set_device(unsigned devid)
hipStream_t starpu_hip_get_local_stream(void)
void starpu_hip_report_error(const char *func, const char *file, int line, hipError_t status)
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)
void starpu_hipblas_report_error(const char *func, const char *file, int line, int status)
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)