Skip to content

Commit 2d319fa

Browse files
committed
add Long dtype
1 parent 30847c8 commit 2d319fa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

core/ir/Input.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ bool valid_dtype_format_combo(nvinfer1::DataType dtype, nvinfer1::TensorFormat f
1515
default:
1616
return false;
1717
}
18+
case nvinfer1::DataType::kINT64: // Supports just Linear (NCHW)
19+
switch (format) {
20+
case nvinfer1::TensorFormat::kLINEAR:
21+
return true;
22+
case nvinfer1::TensorFormat::kHWC:
23+
default:
24+
return false;
25+
}
1826
case nvinfer1::DataType::kINT32: // Supports just Linear (NCHW)
1927
switch (format) {
2028
case nvinfer1::TensorFormat::kLINEAR:
@@ -64,6 +72,8 @@ bool valid_input_dtype(nvinfer1::DataType dtype) {
6472
return true;
6573
case nvinfer1::DataType::kINT32:
6674
return true;
75+
case nvinfer1::DataType::kINT64:
76+
return true;
6777
default:
6878
return false;
6979
}

0 commit comments

Comments
 (0)