mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/15316 This starts cleaning up the files in c10 according to the module structure we decided on. Move to c10/util: - Half.h, Half-inl.h, Half.cpp, bitcasts.h Move to c10/core: - Device.h, Device.cpp - DeviceType.h, DeviceType.cpp i-am-not-moving-c2-to-c10 Reviewed By: dzhulgakov Differential Revision: D13498493 fbshipit-source-id: dfcf1c490474a12ab950c72ca686b8ad86428f63
23 lines
578 B
C++
23 lines
578 B
C++
#include <c10/core/TensorOptions.h>
|
|
|
|
#include <c10/core/Device.h>
|
|
#include <c10/core/Layout.h>
|
|
#include <c10/core/ScalarType.h>
|
|
#include <c10/util/Optional.h>
|
|
|
|
#include <iostream>
|
|
|
|
namespace c10 {
|
|
|
|
std::ostream& operator<<(
|
|
std::ostream& stream,
|
|
const TensorOptions& options) {
|
|
return stream << "TensorOptions(dtype=" << options.dtype()
|
|
<< ", device=" << options.device()
|
|
<< ", layout=" << options.layout()
|
|
<< ", requires_grad=" << std::boolalpha
|
|
<< options.requires_grad() << ")";
|
|
}
|
|
|
|
} // namespace c10
|