bf16 convert failed
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 13.4k
- Forks
- 2.4k
- Avg merge
- 5d 3h
- Merged PRs (30d)
- 2
Description
Environment
TensorRT Version: 10.1
NVIDIA GPU:3060
CUDA Version:11.1
Steps To Reproduce
/trtexec --onnx=./lk_800.onnx --saveEngine=./lk_bf16.trt --bf16 --profilingVerbosity=detailed
engine_file_path = './lk_bf16.trt'
engine = load_engine(engine_file_path)
inspector = engine.create_engine_inspector()
print(inspector.get_engine_information(trt.LayerInformationFormat.JSON))
"Name": "PWN(PWN(/model.22/cv3.2/cv3.2.0/act/Sigmoid), PWN(/model.22/cv3.2/cv3.2.0/act/Mul))",
"LayerType": "PointWiseV2",
"Inputs": [
{
"Name": "/model.22/cv2.2/cv2.2.0/conv/Conv || /model.22/cv3.2/cv3.2.0/conv/Conv || /model.22/cv4.2/cv4.2.0/conv/Conv",
"Location": "Device",
"Dimensions": [1,64,25,25],
"Format/Datatype": "Row major linear FP32"
}],
"Outputs": [
{
"Name": "/model.22/cv3.2/cv3.2.0/act/Mul_output_0",
"Location": "Device",
"Dimensions": [1,64,25,25],
"Format/Datatype": "Row major linear FP32"
}],
"ParameterType": "PointWise",
"ParameterSubType": "PointWiseExpression",
"NbInputArgs": 1,
"InputArgs": ["arg0"],
"NbOutputVars": 1,
"OutputVars": ["var4"],
"NbParams": 0,
"Params": [],
"NbLiterals": 5,
"Literals": ["0.000000e+00f", "1.000000e+00f", "0.000000e+00f", "0.000000e+00f", "1.000000e+00f"],
"NbOperations": 5,
"Operations": ["auto const var0 = pwgen::iNeg(arg0);", "auto const var1 = pwgen::iExp(var0);", "auto const var2 = pwgen::iPlus(literal4, var1);", "auto const var3 = pwgen::iRcp(var2);", "auto const var4 = pwgen::iMul(arg0, var3);"],
"TacticValue": "0x0000000000000002",
"StreamId": 0,
"Metadata": "[ONNX Layer: /model.22/cv3.2/cv3.2.0/act/Sigmoid]\u001e[ONNX Layer: /model.22/cv3.2/cv3.2.0/act/Mul]"
},{
"Name": "Reformatting CopyNode for Input Tensor 0 to /model.22/cv4.2/cv4.2.1/conv/Conv",
"LayerType": "NoOp",
"Inputs": [
{
"Name": "/model.22/cv4.2/cv4.2.0/act/Mul_output_0",
"Location": "Device",
"Dimensions": [1,32,25,25],
"Format/Datatype": "Row major linear FP32"
}],
"Outputs": [
{
"Name": "Reformatted Input Tensor 0 to /model.22/cv4.2/cv4.2.1/conv/Conv",
"Location": "Device",
"Dimensions": [1,32,25,25],
"Format/Datatype": "Row major linear FP32"
}],
"TacticValue": "0x0000000000000000",
"StreamId": 0,
"Metadata": ""
},{
"Name": "/model.22/cv4.2/cv4.2.1/conv/Conv",
"LayerType": "CaskConvolution",
"Inputs": [
{
"Name": "Reformatted Input Tensor 0 to /model.22/cv4.2/cv4.2.1/conv/Conv",
"Location": "Device",
"Dimensions": [1,32,25,25],
"Format/Datatype": "Row major linear FP32"
}],
"Outputs": [
{
"Name": "/model.22/cv4.2/cv4.2.1/conv/Conv_output_0",
"Location": "Device",
"Dimensions": [1,32,25,25],
"Format/Datatype": "Row major linear FP32"
}],
"ParameterType": "Convolution",
"Kernel": [3,3],
"PaddingMode": "kEXPLICIT_ROUND_DOWN",
"PrePadding": [1,1],
"PostPadding": [1,1],
"Stride": [1,1],
"Dilation": [1,1],
"OutMaps": 32,
"Groups": 1,
"Weights": {"Type": "Float", "Count": 9216},
"Bias": {"Type": "Float", "Count": 32},
"HasBias": 1,
"HasReLU": 0,
"HasSparseWeights": 0,
"HasDynamicFilter": 0,
"HasDynamicBias": 0,
"HasResidual": 0,
"ConvXAsActInputIdx": -1,
"BiasAsActInputIdx": -1,
"ResAsActInputIdx": -1,
"Activation": "NONE",
"TacticName": "sm80_xmma_fprop_wngd_f32f32_f32_f32_nchwkcrs_nchw_tilesize8x16x16x8_warpsize8x1x1_wngd2x2",
"TacticValue": "0xe38e9dfd56c33779",
"StreamId": 0,
without bf16
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the /trtexec --onnx=./lk_800.onnx --saveEngine=./lk_bf16.trt --bf16 --profilingVerbosity=detailed command with TensorRT 10.1, CUDA 11.1, and the NVIDIA 3060. Compare the engine inspector output for the bf16 and non-bf16 runs, focusing on the reported layer datatypes and tactics; done means the bf16 conversion behavior is explained or corrected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100