forked from iree-org/iree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapi.h
47 lines (36 loc) · 1.48 KB
/
api.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// Copyright 2021 The IREE Authors
//
// Licensed under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// See iree/base/api.h for documentation on the API conventions used.
#ifndef IREE_HAL_ROCM_API_H_
#define IREE_HAL_ROCM_API_H_
#include "iree/base/api.h"
#include "iree/hal/api.h"
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
//===----------------------------------------------------------------------===//
// iree_hal_rocm_driver_t
//===----------------------------------------------------------------------===//
// ROCM driver creation options.
typedef struct iree_hal_rocm_driver_options_t {
// Index of the default ROCM device to use within the list of available
// devices.
int default_device_index;
} iree_hal_rocm_driver_options_t;
IREE_API_EXPORT void iree_hal_rocm_driver_options_initialize(
iree_hal_rocm_driver_options_t *out_options);
// Creates a ROCM HAL driver that manage its own hipcontext.
//
// |out_driver| must be released by the caller (see |iree_hal_driver_release|).
IREE_API_EXPORT iree_status_t iree_hal_rocm_driver_create(
iree_string_view_t identifier,
const iree_hal_rocm_driver_options_t *options,
iree_allocator_t host_allocator, iree_hal_driver_t **out_driver);
// TODO(thomasraoux): Support importing a CUcontext from app.
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
#endif // IREE_HAL_ROCM_API_H_