Skip to content

Commit 0afe054

Browse files
author
Dmitry Rogozhkin
committed
Drop src/torchcodec/_core/ when including headers from _core
To facilitate development of out-of-tree torchcodec features (such as non-cuda gpu plugins) we need to make torchcodec headers includable by 3rd party projects. This means dropping `src/torchcodec/_core/` prefix when torchcodec self-includes headers. Signed-off-by: Dmitry Rogozhkin <[email protected]>
1 parent 28cec51 commit 0afe054

33 files changed

+79
-79
lines changed

src/torchcodec/_core/AVIOContextHolder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This source code is licensed under the BSD-style license found in the
55
// LICENSE file in the root directory of this source tree.
66

7-
#include "src/torchcodec/_core/AVIOContextHolder.h"
7+
#include "AVIOContextHolder.h"
88
#include <torch/types.h>
99

1010
namespace facebook::torchcodec {

src/torchcodec/_core/AVIOContextHolder.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#pragma once
88

9-
#include "src/torchcodec/_core/FFMPEGCommon.h"
9+
#include "FFMPEGCommon.h"
1010

1111
namespace facebook::torchcodec {
1212

src/torchcodec/_core/AVIOFileLikeContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This source code is licensed under the BSD-style license found in the
55
// LICENSE file in the root directory of this source tree.
66

7-
#include "src/torchcodec/_core/AVIOFileLikeContext.h"
7+
#include "AVIOFileLikeContext.h"
88
#include <torch/types.h>
99

1010
namespace facebook::torchcodec {

src/torchcodec/_core/AVIOFileLikeContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <pybind11/pybind11.h>
1010
#include <pybind11/stl.h>
1111

12-
#include "src/torchcodec/_core/AVIOContextHolder.h"
12+
#include "AVIOContextHolder.h"
1313

1414
namespace py = pybind11;
1515

src/torchcodec/_core/AVIOTensorContext.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// This source code is licensed under the BSD-style license found in the
55
// LICENSE file in the root directory of this source tree.
66

7-
#include "src/torchcodec/_core/AVIOTensorContext.h"
7+
#include "AVIOTensorContext.h"
88
#include <torch/types.h>
99

1010
namespace facebook::torchcodec {

src/torchcodec/_core/AVIOTensorContext.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#pragma once
88

99
#include <torch/types.h>
10-
#include "src/torchcodec/_core/AVIOContextHolder.h"
10+
#include "AVIOContextHolder.h"
1111

1212
namespace facebook::torchcodec {
1313

src/torchcodec/_core/BetaCudaDeviceInterface.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99
#include <mutex>
1010
#include <vector>
1111

12-
#include "src/torchcodec/_core/BetaCudaDeviceInterface.h"
12+
#include "BetaCudaDeviceInterface.h"
1313

14-
#include "src/torchcodec/_core/DeviceInterface.h"
15-
#include "src/torchcodec/_core/FFMPEGCommon.h"
16-
#include "src/torchcodec/_core/NVDECCache.h"
14+
#include "DeviceInterface.h"
15+
#include "FFMPEGCommon.h"
16+
#include "NVDECCache.h"
1717

18-
#include "src/torchcodec/_core/NVCUVIDRuntimeLoader.h"
19-
#include "src/torchcodec/_core/nvcuvid_include/cuviddec.h"
20-
#include "src/torchcodec/_core/nvcuvid_include/nvcuvid.h"
18+
#include "NVCUVIDRuntimeLoader.h"
19+
#include "nvcuvid_include/cuviddec.h"
20+
#include "nvcuvid_include/nvcuvid.h"
2121

2222
extern "C" {
2323
#include <libavutil/hwcontext_cuda.h>

src/torchcodec/_core/BetaCudaDeviceInterface.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
#pragma once
1717

18-
#include "src/torchcodec/_core/CUDACommon.h"
19-
#include "src/torchcodec/_core/Cache.h"
20-
#include "src/torchcodec/_core/DeviceInterface.h"
21-
#include "src/torchcodec/_core/FFMPEGCommon.h"
22-
#include "src/torchcodec/_core/NVDECCache.h"
18+
#include "CUDACommon.h"
19+
#include "Cache.h"
20+
#include "DeviceInterface.h"
21+
#include "FFMPEGCommon.h"
22+
#include "NVDECCache.h"
2323

2424
#include <map>
2525
#include <memory>
@@ -28,8 +28,8 @@
2828
#include <unordered_map>
2929
#include <vector>
3030

31-
#include "src/torchcodec/_core/nvcuvid_include/cuviddec.h"
32-
#include "src/torchcodec/_core/nvcuvid_include/nvcuvid.h"
31+
#include "nvcuvid_include/cuviddec.h"
32+
#include "nvcuvid_include/nvcuvid.h"
3333

3434
namespace facebook::torchcodec {
3535

src/torchcodec/_core/CUDACommon.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
// This source code is licensed under the BSD-style license found in the
55
// LICENSE file in the root directory of this source tree.
66

7-
#include "src/torchcodec/_core/CUDACommon.h"
8-
#include "src/torchcodec/_core/Cache.h" // for PerGpuCache
7+
#include "CUDACommon.h"
8+
#include "Cache.h" // for PerGpuCache
99

1010
namespace facebook::torchcodec {
1111

src/torchcodec/_core/CUDACommon.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#include <npp.h>
1212
#include <torch/types.h>
1313

14-
#include "src/torchcodec/_core/FFMPEGCommon.h"
15-
#include "src/torchcodec/_core/Frame.h"
14+
#include "FFMPEGCommon.h"
15+
#include "Frame.h"
1616

1717
extern "C" {
1818
#include <libavutil/hwcontext_cuda.h>

0 commit comments

Comments
 (0)