blob: c83168e63b656df68fb0d4d67d2c5eb4b082c6e7 [file] [log] [blame]
// 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
#ifndef IREE_HAL_CUDA_GRAPH_COMMAND_BUFFER_H_
#define IREE_HAL_CUDA_GRAPH_COMMAND_BUFFER_H_
#include "iree/hal/api.h"
#include "iree/hal/cuda/context_wrapper.h"
#include "iree/hal/cuda/cuda_headers.h"
#include "iree/hal/cuda/dynamic_symbols.h"
#ifdef __cplusplus
extern "C" {
#endif // __cplusplus
// Creates a cuda graph.
iree_status_t iree_hal_cuda_graph_command_buffer_allocate(
iree_hal_cuda_context_wrapper_t* context,
iree_hal_command_buffer_mode_t mode,
iree_hal_command_category_t command_categories,
iree_hal_queue_affinity_t queue_affinity,
iree_hal_command_buffer_t** out_command_buffer);
// Returns the native cuda graph associated to the command buffer.
CUgraphExec iree_hal_cuda_graph_command_buffer_exec(
const iree_hal_command_buffer_t* command_buffer);
#ifdef __cplusplus
} // extern "C"
#endif // __cplusplus
#endif // IREE_HAL_CUDA_GRAPH_COMMAND_BUFFER_H_