cupva_host_cuda.h#

Fully qualified name: src/host/c_api/include/cupva_host_cuda.h

File members: src/host/c_api/include/cupva_host_cuda.h

/*
 * Copyright (c) 2022, NVIDIA CORPORATION. All rights reserved.
 *
 * NVIDIA Corporation and its licensors retain all intellectual property
 * and proprietary rights in and to this software, related documentation
 * and any modifications thereto.  Any use, reproduction, disclosure or
 * distribution of this software and related documentation without an express
 * license agreement from NVIDIA Corporation is strictly prohibited.
 */

#ifndef CUPVA_HOST_CUDA_H
#define CUPVA_HOST_CUDA_H

#include <cuda_runtime.h>
#include <detail/scheduling/cupva_host_mem_alloc.h>
#include <detail/scheduling/cupva_host_types_scheduling.h>
#include <stdbool.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif

DLL_EXPORT cupvaError_t CupvaCudaMemImport(void **const devPtr, void *const cudaDevPtr, int64_t const size,
                                           cupvaMemAccessType_t const accessType);

DLL_EXPORT cupvaError_t CupvaCudaCreateStream(cupvaStream_t *const stream, cudaStream_t const cudaStream,
                                              cupvaEngineType_t const absEngine, cupvaAffinityType_t const vpuAffinity);

DLL_EXPORT cupvaError_t CupvaCudaContextSupportsCuda(cupvaContext_t const ctx, bool *const cudaFlag);

DLL_EXPORT cupvaError_t CupvaCudaForceDisableSupport(void);

DLL_EXPORT cupvaError_t CupvaCudaStreamSubmit(cudaStream_t const cudaStream, cupvaCmd_t const *const *const command,
                                              cupvaCmdStatus_t *const status, int32_t const count,
                                              cupvaOrderType_t const order, int32_t const executionTimeout,
                                              int32_t const submitTimeout);

DLL_EXPORT cupvaError_t CupvaCudaStreamSubmitCmdBuffer(cudaStream_t const cudaStream, cupvaCmdBuffer_t const cmdBuffer,
                                                       int32_t const executionTimeout, int32_t const submitTimeout);

DLL_EXPORT cupvaError_t CupvaCudaStreamSetAffinity(cudaStream_t const cudaStream,
                                                   cupvaAffinityType_t const vpuAffinity);

#ifdef __cplusplus
}
#endif
#endif