mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[Kineto][Bug Fix] Avoid picking up old CUPTI headers (#72761)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72761
By default, the CUPTI_INCLUDE_DIR will pick up cupti.h from /usr/include which is old (from 2017 on AWS), and missing many cupti headers. Use NO_DEFAULT_PATH to avoid that, instead search from the list of locations provided.
Test Plan:
Fixes missing headers error when building on AWS. (Avoids old cupti.h from /usr/include). Instead uses cupti.h from cuda/extras/CUPTI/include.
```
In file included from /scratch/aaronshi/pytorch/third_party/kineto/libkineto/src/CuptiRangeProfilerApi.cpp:13:0:
/scratch/aaronshi/pytorch/third_party/kineto/libkineto/src/CuptiRangeProfilerApi.h:12:10: fatal error: cupti_profiler_target.h: No such file or directory
#include <cupti_profiler_target.h>
^~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
```
and
```
/scratch/aaronshi/pytorch/third_party/kineto/libkineto/src/CuptiRangeProfilerApi.cpp:7:10: fatal error: nvperf_host.h: No such file or directory
#include <nvperf_host.h>
^~~~~~~~~~~~~~~
compilation terminated.
```
Reviewed By: briancoutinho
Differential Revision: D34191123
Pulled By: aaronenyeshi
fbshipit-source-id: d84f80308c9939ba8ed504e667847d136a261453
(cherry picked from commit 33368bd93b)
This commit is contained in:
parent
277c4c9dec
commit
8a43aa9538
|
|
@ -1909,10 +1909,11 @@ if(USE_KINETO)
|
||||||
${CUDA_SOURCE_DIR}/lib64)
|
${CUDA_SOURCE_DIR}/lib64)
|
||||||
|
|
||||||
find_path(CUPTI_INCLUDE_DIR cupti.h PATHS
|
find_path(CUPTI_INCLUDE_DIR cupti.h PATHS
|
||||||
|
${CUDA_SOURCE_DIR}/extras/CUPTI/include
|
||||||
${CUDA_INCLUDE_DIRS}
|
${CUDA_INCLUDE_DIRS}
|
||||||
${CUDA_SOURCE_DIR}
|
${CUDA_SOURCE_DIR}
|
||||||
${CUDA_SOURCE_DIR}/extras/CUPTI/include
|
${CUDA_SOURCE_DIR}/include
|
||||||
${CUDA_SOURCE_DIR}/include)
|
NO_DEFAULT_PATH)
|
||||||
|
|
||||||
if(CUPTI_LIBRARY_PATH AND CUPTI_INCLUDE_DIR)
|
if(CUPTI_LIBRARY_PATH AND CUPTI_INCLUDE_DIR)
|
||||||
message(STATUS " CUPTI_INCLUDE_DIR = ${CUPTI_INCLUDE_DIR}")
|
message(STATUS " CUPTI_INCLUDE_DIR = ${CUPTI_INCLUDE_DIR}")
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user