Conversation
95c2633 to
90fcd2b
Compare
9e171ba to
cf0f12d
Compare
|
If possible consider adding a test, we talked a bit about a new INetwork verification test based on expected numbers of ops. Might be a simple case to build the harness for |
|
@narendasan I'll merge this PR now and cherrypick to the release 2.8, and then work on the number of ops check in another PR for the next release. sounds like a plan? |
|
there's an error. will merge after fixing |
this case fails because self.input_names: ['x'] Since |
2b14b94 to
cf9e7bd
Compare
| for i, output in enumerate(outputs): | ||
| # In some cases, the same output tensor may be marked multiple times, such as _to_oppy, | ||
| # so we skip marking if the output is already marked | ||
| if id(output) in marked_outputs_ids: |
There was a problem hiding this comment.
Where does this id function come from?
There was a problem hiding this comment.
id() is a built-in function that returns the "identity" of an object.
| args[0], | ||
| kwargs.get("dtype", args[0].dtype), | ||
| force_layer=True, | ||
| force_layer=False, |
There was a problem hiding this comment.
I think there might be cases where we might need to actually force_layer=True. Do you know when that would be useful?. Also consider adding a comment here conveying that force_layer=False results in better performance.
There was a problem hiding this comment.
Do you know when we need force_layer=True? My understanding is that 1) Since cast_trt_tensor would be called even if the force_layer=False, it only adds Cast Layer if necessary. 2) If an operator satisfies not is_only_operator_on_placeholder, that means there's other operator on the placeholder or the lowering pass repair_input_as_output to promise "input is not output", so we don't have to explicitly add Cast Layer.
Description
In Monai/Unet, I observed that Torch-TRT's prelu is slower than ONNX-TRT, and what is worse is that using prelu converter is even slower than decomposing it.
Update: The perf issue is because
to_copyforces to insert Cast Layer.Fixes #3715 #3723
Type of change
Checklist: