Skip to content

Commit cd6e64d

Browse files
Remove iostream to output the shape
1 parent c2cdcd6 commit cd6e64d

File tree

2 files changed

+0
-15
lines changed

2 files changed

+0
-15
lines changed

examples/hello_world/run.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ int main(int argc, char **argv) {
4040
for (int i = 0; i < N; ++i) {
4141
inputArr[i] = static_cast<float>(i) / 10.0; // dummy input data
4242
}
43-
std::cout << Shape{N} << std::endl;
4443
Tensor input = createTensor(ctx, Shape{N}, kf32, inputArr.data());
4544
Tensor output = createTensor(ctx, Shape{N}, kf32);
4645
Kernel op = createKernel(ctx, {kGelu, 256, kf32},

gpu.hpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -71,20 +71,6 @@ struct Shape {
7171
}
7272
};
7373

74-
inline std::ostream& operator<<(std::ostream& os, const Shape& shape)
75-
{
76-
int size = shape.rank;
77-
os << "Shape: [";
78-
for (int i=0;i<size-1;i++){
79-
os << shape.data[i] << ",";
80-
}
81-
if ( size != 0 ) {
82-
os << shape.data[size-1];
83-
}
84-
os << "]";
85-
return os;
86-
}
87-
8874
/**
8975
* @brief Returns the number of elements in a tensor with the given shape,
9076
* which is equal to the product of the dimensions.

0 commit comments

Comments
 (0)