From cae5ddd4a2c9343ec7367c9049c5cc0c8628a9c4 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Wed, 8 Jan 2020 11:09:20 -0500 Subject: Setup of runtime cuda device (#1162) * CUDA generated first test compiles. * WIP on enabling CUDA in render-test. * Detect CUDA_PATH environmental variable to build build cuda support into render-test. Added WIP cuda-compute-util.cpp/h Added CUDA as a renderer type. * Fix libraries needed for cuda in premake. * Added -enable-cuda premake option. Defaults to false. * Creates CUDA device, loads PTX and finds entry point. * Fix some erroneous cruft from slang-cuda-prelude.h --- tools/render-test/cuda/cuda-compute-util.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tools/render-test/cuda/cuda-compute-util.h (limited to 'tools/render-test/cuda/cuda-compute-util.h') diff --git a/tools/render-test/cuda/cuda-compute-util.h b/tools/render-test/cuda/cuda-compute-util.h new file mode 100644 index 000000000..9c7d83b1f --- /dev/null +++ b/tools/render-test/cuda/cuda-compute-util.h @@ -0,0 +1,21 @@ +#ifndef CUDA_COMPUTE_UTIL_H +#define CUDA_COMPUTE_UTIL_H + +#include "../slang-support.h" +#include "../options.h" + +#include "../../source/core/slang-smart-pointer.h" + +namespace renderer_test { + +struct CUDAComputeUtil +{ + static SlangResult execute(const ShaderCompilerUtil::OutputAndLayout& outputAndLayout); + + static bool canCreateDevice(); +}; + + +} // renderer_test + +#endif //CPU_MEMORY_BINDING_H -- cgit v1.2.3