How to write setup.py for C++ (CPython) extensions to Python with CUDA?

Dear All,

I am using Microsoft Visual Studio 2015 for creating C++ extensions for Python. Normally, when my extension in C++ does not contain CUDA codes, then I create a setup.py files like the one below (taken from microsoft website https://docs.microsoft.com/en-us/visualstudio/python/working-with-c-cpp-python-in-visual-studio?view=vs-2017):

from distutils.core import setup, Extension, DEBUG

sfc_module = Extension(‘superfastcode’, sources = [‘module.cpp’])

setup(name = ‘superfastcode’, version = ‘1.0’,
description = ‘Python Package with superfastcode C++ extension’,
ext_modules = [sfc_module]
)

I run this code from console with the command: pip install .

Now I want to know what modifications are needed if the C++ extension also has CUDA files. I have already included CUDA in the build dependencies of the project . But using simply the code above gives the following error: Cannot open include file: ‘cuda.h’: No such file or directory error: command ‘C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe’ failed with exit status 2

I would greatly appreciate any help from the group on this matter.

Thank you.

Best,
Sanat