Skip to content

Commit 58fd0ec

Browse files
author
pengcheng888
committed
fix format
1 parent 1f81543 commit 58fd0ec

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

python/infinicore/_tensor_str.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ def set_printoptions(
2626
sci_mode=None,
2727
):
2828
r"""Set options for printing.
29-
3029
Args:
3130
precision: Number of digits of precision for floating point output (default = 4).
3231
threshold: Total number of array elements which trigger summarization rather than full `repr` (default = 1000).
@@ -41,7 +40,6 @@ def set_printoptions(
4140
>>> torch.set_printoptions(precision=2)
4241
>>> torch.tensor([1.12345])
4342
tensor([1.12])
44-
4543
"""
4644
if profile is not None:
4745
if profile == "default":

src/infinicore-test/test_tensor_destructor.cc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,6 @@ TestResult TensorDestructorTest::testPrintOptions() {
311311

312312
std::cout << "\n=== Testing Print Options for Different Data Types ===" << std::endl;
313313

314-
// Reset to defaults before each test
315-
set_precision(-1);
316-
set_line_width(80);
317-
set_threshold(1000);
318-
set_edge_items(3);
319-
set_sci_mode(-1);
320-
321314
// Process each test case
322315
for (const auto &test_case : case_list) {
323316
// Extract tuple elements
@@ -327,11 +320,6 @@ TestResult TensorDestructorTest::testPrintOptions() {
327320
std::cout << tensor << std::endl;
328321
}
329322

330-
// Test print options with F32 tensor
331-
set_precision(-1);
332-
set_line_width(80);
333-
set_threshold(1000);
334-
set_edge_items(3);
335323
set_sci_mode(-1);
336324
std::cout << "\n=== Testing Print Options with F32 Tensor ===" << std::endl;
337325
{

src/infinicore/tensor/io.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
#include <cmath>
66
#include <cstdint>
77
#include <iomanip>
8+
#include <ios>
89
#include <iostream>
10+
#include <ostream>
11+
#include <sstream>
12+
#include <string>
913
#include <vector>
1014

1115
namespace {

0 commit comments

Comments
 (0)