Make a real repro for IConstantLayer: we need to call getType() before
getDimensions(), then if CreateConstantLayer() doesn't set the dtype, the test will fail. Before CreateConstantLayer() was added, graphs which trigger conversion of INT32 weights to IConstantLayer will crash the TRT conversion. This is a bug in TRT 5.0 and I has reported it to NVIDIA. CreateConstantLayer() fixed that by setting the dtype of the output ITensor of the IConstantLayer, but the added test could not reproduce the error when we remove the setting code. This change fix the test, so when removing the dtype setting logic the test will fail. Note that, after this fix, during conversion it'll report a lot of spammy logs but won't crash. Once NVIDIA fixed the TRT bug we should remove the dtype setting logic and the test should still pass. PiperOrigin-RevId: 229758150
Loading
Please sign in to comment