首页下载资源人工智能nvrtc头文件与链接库

ZIPnvrtc头文件与链接库

xulingjie_online8.48MB需要积分:1

资源文件列表:

nvrtc.zip 大约有4个文件
  1. nvrtc/
  2. nvrtc/nvrtc.h 19.82KB
  3. nvrtc/libnvrtc.so 20.7MB
  4. nvrtc/libnvrtc-builtins.so 3.18MB

资源介绍:

把里面的h文件放到/usr/local/cuda-xx/include 把里面的.so放到/usr/local/cuda-xx/lib64
// // NVIDIA_COPYRIGHT_BEGIN // // Copyright (c) 2014-2017, 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. // // NVIDIA_COPYRIGHT_END // #ifndef __NVRTC_H__ #define __NVRTC_H__ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include /*************************************************************************//** * * \defgroup error Error Handling * * NVRTC defines the following enumeration type and function for API call * error handling. * ****************************************************************************/ /** * \ingroup error * \brief The enumerated type nvrtcResult defines API call result codes. * NVRTC API functions return nvrtcResult to indicate the call * result. */ typedef enum { NVRTC_SUCCESS = 0, NVRTC_ERROR_OUT_OF_MEMORY = 1, NVRTC_ERROR_PROGRAM_CREATION_FAILURE = 2, NVRTC_ERROR_INVALID_INPUT = 3, NVRTC_ERROR_INVALID_PROGRAM = 4, NVRTC_ERROR_INVALID_OPTION = 5, NVRTC_ERROR_COMPILATION = 6, NVRTC_ERROR_BUILTIN_OPERATION_FAILURE = 7, NVRTC_ERROR_NO_NAME_EXPRESSIONS_AFTER_COMPILATION = 8, NVRTC_ERROR_NO_LOWERED_NAMES_BEFORE_COMPILATION = 9, NVRTC_ERROR_NAME_EXPRESSION_NOT_VALID = 10, NVRTC_ERROR_INTERNAL_ERROR = 11 } nvrtcResult; /** * \ingroup error * \brief nvrtcGetErrorString is a helper function that returns a string * describing the given nvrtcResult code, e.g., NVRTC_SUCCESS to * \c "NVRTC_SUCCESS". * For unrecognized enumeration values, it returns * \c "NVRTC_ERROR unknown". * * \param [in] result CUDA Runtime Compilation API result code. * \return Message string for the given #nvrtcResult code. */ const char *nvrtcGetErrorString(nvrtcResult result); /*************************************************************************//** * * \defgroup query General Information Query * * NVRTC defines the following function for general information query. * ****************************************************************************/ /** * \ingroup query * \brief nvrtcVersion sets the output parameters \p major and \p minor * with the CUDA Runtime Compilation version number. * * \param [out] major CUDA Runtime Compilation major version number. * \param [out] minor CUDA Runtime Compilation minor version number. * \return * - \link #nvrtcResult NVRTC_SUCCESS \endlink * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink * */ nvrtcResult nvrtcVersion(int *major, int *minor); /*************************************************************************//** * * \defgroup compilation Compilation * * NVRTC defines the following type and functions for actual compilation. * ****************************************************************************/ /** * \ingroup compilation * \brief nvrtcProgram is the unit of compilation, and an opaque handle for * a program. * * To compile a CUDA program string, an instance of nvrtcProgram must be * created first with ::nvrtcCreateProgram, then compiled with * ::nvrtcCompileProgram. */ typedef struct _nvrtcProgram *nvrtcProgram; /** * \ingroup compilation * \brief nvrtcCreateProgram creates an instance of nvrtcProgram with the * given input parameters, and sets the output parameter \p prog with * it. * * \param [out] prog CUDA Runtime Compilation program. * \param [in] src CUDA program source. * \param [in] name CUDA program name.\n * \p name can be \c NULL; \c "default_program" is * used when \p name is \c NULL. * \param [in] numHeaders Number of headers used.\n * \p numHeaders must be greater than or equal to 0. * \param [in] headers Sources of the headers.\n * \p headers can be \c NULL when \p numHeaders is * 0. * \param [in] includeNames Name of each header by which they can be * included in the CUDA program source.\n * \p includeNames can be \c NULL when \p numHeaders * is 0. * \return * - \link #nvrtcResult NVRTC_SUCCESS \endlink * - \link #nvrtcResult NVRTC_ERROR_OUT_OF_MEMORY \endlink * - \link #nvrtcResult NVRTC_ERROR_PROGRAM_CREATION_FAILURE \endlink * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink * * \see ::nvrtcDestroyProgram */ nvrtcResult nvrtcCreateProgram(nvrtcProgram *prog, const char *src, const char *name, int numHeaders, const char * const *headers, const char * const *includeNames); /** * \ingroup compilation * \brief nvrtcDestroyProgram destroys the given program. * * \param [in] prog CUDA Runtime Compilation program. * \return * - \link #nvrtcResult NVRTC_SUCCESS \endlink * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink * * \see ::nvrtcCreateProgram */ nvrtcResult nvrtcDestroyProgram(nvrtcProgram *prog); /** * \ingroup compilation * \brief nvrtcCompileProgram compiles the given program. * * It supports compile options listed in \ref options. */ nvrtcResult nvrtcCompileProgram(nvrtcProgram prog, int numOptions, const char * const *options); /** * \ingroup compilation * \brief nvrtcGetPTXSize sets \p ptxSizeRet with the size of the PTX * generated by the previous compilation of \p prog (including the * trailing \c NULL). * * \param [in] prog CUDA Runtime Compilation program. * \param [out] ptxSizeRet Size of the generated PTX (including the trailing * \c NULL). * \return * - \link #nvrtcResult NVRTC_SUCCESS \endlink * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink * * \see ::nvrtcGetPTX */ nvrtcResult nvrtcGetPTXSize(nvrtcProgram prog, size_t *ptxSizeRet); /** * \ingroup compilation * \brief nvrtcGetPTX stores the PTX generated by the previous compilation * of \p prog in the memory pointed by \p ptx. * * \param [in] prog CUDA Runtime Compilation program. * \param [out] ptx Compiled result. * \return * - \link #nvrtcResult NVRTC_SUCCESS \endlink * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink * * \see ::nvrtcGetPTXSize */ nvrtcResult nvrtcGetPTX(nvrtcProgram prog, char *ptx); /** * \ingroup compilation * \brief nvrtcGetProgramLogSize sets \p logSizeRet with the size of the * log generated by the previous compilation of \p prog (including the * trailing \c NULL). * * Note that compilation log may be generated with warnings and informative * messages, even when the compilation of \p prog succeeds. * * \param [in] prog CUDA Runtime Compilation program. * \param [out] logSizeRet Size of the compilation log * (including the trailing \c NULL). * \return * - \link #nvrtcResult NVRTC_SUCCESS \endlink * - \link #nvrtcResult NVRTC_ERROR_INVALID_INPUT \endlink * - \link #nvrtcResult NVRTC_ERROR_INVALID_PROGRAM \endlink * * \see ::nvrtcGetProgramLog */ nvrtcResult nvrtcGetProgramLogSize(nvrtcProgram prog, size_t *logSizeRet); /** * \ingroup compilation * \brief nvrtc
100+评论
captcha