blob: 2b0922d2b909075ab1f3feee4aea40d5767543ed [file] [log] [blame]
Adam Jesionowski6e273a72022-04-14 12:20:20 -07001/*
2 * Copyright 2022 Google LLC
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
Cindy Liu3c4d6272022-08-04 18:54:12 -070017#ifndef DEVICE_DEVICE_H_
18#define DEVICE_DEVICE_H_
Cindy Liu2449a162021-11-12 22:48:02 -080019
Lun Dongc3937892022-10-11 13:19:37 -070020#include "iree/hal/local/executable_loader.h"
Cindy Liu2449a162021-11-12 22:48:02 -080021
22// Create the HAL device from the different backend targets.
Lun Dongc3937892022-10-11 13:19:37 -070023// The HAL device and loader are returned based on the implementation, and they
24// must be released by the caller.
Lun Dong328fb1f2021-12-03 22:57:00 +000025iree_status_t create_sample_device(iree_allocator_t host_allocator,
Lun Dongc3937892022-10-11 13:19:37 -070026 iree_hal_device_t** out_device,
27 iree_hal_executable_loader_t** loader);
Cindy Liu2449a162021-11-12 22:48:02 -080028
Cindy Liu3c4d6272022-08-04 18:54:12 -070029#endif // DEVICE_DEVICE_H_