Skip to content

Commit 210a977

Browse files
authored
Remove onnx.helper.float32_to_bfloat16 (#1031)
1 parent 4b80634 commit 210a977

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

tests/lib/model/nns/onnx/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,13 @@
4141

4242
onnx.save(model_def, f"{os.path.dirname(__file__)}/{name}.onnx")
4343

44-
for name, data_type, convert in [
44+
for name, data_type in [
4545
(
4646
"utils_tensor_bfloat16_raw",
4747
onnx.TensorProto.BFLOAT16,
48-
onnx.helper.float32_to_bfloat16,
4948
),
5049
]:
51-
vals = [*map(lambda x: convert(x), [-1, 0, 1, 2])]
50+
vals = [-1, 0, 1, 2]
5251
C_init = onnx.helper.make_tensor(
5352
name="c",
5453
data_type=data_type,

0 commit comments

Comments
 (0)