File tree Expand file tree Collapse file tree 3 files changed +2
-8
lines changed
runtime/core/portable_type/c10/c10 Expand file tree Collapse file tree 3 files changed +2
-8
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 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
120117C10_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
Original file line number Diff line number Diff line change 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
415412C10_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
You can’t perform that action at this time.
0 commit comments