Skip to content

Commit 677e735

Browse files
author
pengcheng888
committed
issue/896 - fix c++调用打印的问题
1 parent d1c8636 commit 677e735

4 files changed

Lines changed: 2 additions & 5 deletions

File tree

include/infinicore/io.hpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@
33
#include "tensor.hpp"
44
#include <iostream>
55

6-
namespace infinicore {
7-
std::ostream &operator<<(std::ostream &out, const Tensor &tensor);
8-
}
9-
106
namespace infinicore::print_options {
117

128
/**

include/infinicore/nn/module.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <type_traits>
77
#include <unordered_map>
88
#include <vector>
9-
#include <spdlog/spdlog.h>
109

1110
namespace infinicore::nn {
1211
class Module {

include/infinicore/nn/rope.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "../tensor.hpp"
55
#include "module.hpp"
66
#include <memory>
7+
#include <cmath>
78

89
namespace infinicore::nn {
910

include/infinicore/tensor.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class Tensor {
9292
friend class TensorImpl;
9393

9494
void resume_from_blob_() const;
95+
friend std::ostream &operator<<(std::ostream &out, const Tensor &tensor);
9596
};
9697

9798
class TensorImpl : public std::enable_shared_from_this<TensorImpl> {

0 commit comments

Comments
 (0)