How to pass include (-I) options for torch.compile

I am getting an compilation error saying that python header files cannot be found when I use torch.compile. I know where they are (/usr/include/python3.8), but torch.compile and gcc cannot find them. How can I pass them to torch.compile?

torch._dynamo.exc.BackendCompilerFailed: debug_wrapper raised CalledProcessError: Command '['/usr/bin/gcc', '/tmp/tmpmt0tghjb/main.c', '-O3', '-I/usr/local/cuda/include', '-I/home/mkellman/__pypackages__/3.8/include', '-I/tmp/tmpmt0tghjb', '-shared', '-fPIC', '-lcuda', '-o', '/tmp/tmpmt0tghjb/triton_.cpython-38-x86_64-linux-gnu.so', '-L/usr/lib/x86_64-linux-gnu']' returned non-zero exit status 1.

There isn’t a way to pass in python header files via torch.compile, to me it looks like you have a problem with your installation. Would suggest using this script pytorch/verify_dynamo.py at main · pytorch/pytorch · GitHub to debug