[fix] Disambiguate element-wise cast layer names by mfeliz-cruise · Pull Request #1630 · pytorch/TensorRT (original) (raw)

Duplicate layer names in TRT cause an error. Cast layers by default are named based on the Tensor pointer initial type and target type. This could cause name conflicts with multiple element-wise operations that performed the same type promotion on a given tensor. To resolve this, add the element_wise layer name to the type-promotion cast layer as a prefix.

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes # (issue)

Type of change

Please delete options that are not relevant and/or add your own.

Checklist: