Skip to content

Commit 6f654eb

Browse files
authored
Re-sync c10 to runtime/core/portable_type (#8553)
No material changes, but let's keep it in sync
1 parent 735f16e commit 6f654eb

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

runtime/core/portable_type/c10/c10/macros/Export.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,10 @@
139139
#endif
140140

141141
#if defined(TORCH_HIP_BUILD_MAIN_LIB)
142+
#define TORCH_HIP_CPP_API C10_EXPORT
142143
#define TORCH_HIP_API C10_EXPORT
143144
#else
145+
#define TORCH_HIP_CPP_API C10_IMPORT
144146
#define TORCH_HIP_API C10_IMPORT
145147
#endif
146148

runtime/core/portable_type/c10/c10/util/BFloat16.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@
88
#include <cstdint>
99
#include <cstring>
1010
#include <iosfwd>
11-
#ifndef C10_EMBEDDED
1211
#include <ostream>
13-
#endif // C10_EMBEDDED
1412

1513
#if defined(__CUDACC__) && !defined(USE_ROCM)
1614
#include <cuda_bf16.h>
@@ -116,14 +114,12 @@ struct alignas(2) BFloat16 {
116114
#endif
117115
};
118116

119-
#ifndef C10_EMBEDDED
120117
C10_API inline std::ostream& operator<<(
121118
std::ostream& out,
122119
const BFloat16& value) {
123120
out << (float)value;
124121
return out;
125122
}
126-
#endif // C10_EMBEDDED
127123

128124
} // namespace c10
129125

runtime/core/portable_type/c10/c10/util/Half.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
#include <cstring>
3030
#include <iosfwd>
3131
#include <limits>
32-
#ifndef C10_EMBEDDED
3332
#include <ostream>
34-
#endif // C10_EMBEDDED
3533

3634
#ifdef __CUDACC__
3735
#include <cuda_fp16.h>
@@ -411,12 +409,10 @@ struct alignas(2) Half {
411409
#endif
412410
};
413411

414-
#ifndef C10_EMBEDDED
415412
C10_API inline std::ostream& operator<<(std::ostream& out, const Half& value) {
416413
out << (float)value;
417414
return out;
418415
}
419-
#endif // C10_EMBEDDED
420416

421417
} // namespace c10
422418

0 commit comments

Comments
 (0)