support op hardtanh & fix op unfold, empty, max_pool2d_with_index, max_pool3d_with_index #1518
+631
−481
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
支持 hardtanh 并修复 unfold, empty, max_pool2d_with_index, max_pool3d_with_index
1.新增 HardtanhMapper。
2. unfold 中增加不对称 paddling 的支持。
3. empty 算子中元素值是未初始化的,因此单测使用 zeros_like 统一输出结果。
4. 修复 Pool2dMapper 中的 pd_op.max_pool2d_with_index 情况和 Pool3dMapper 中的 pd_op.max_pool3d_with_index 情况,在pir中这两个算子的kernel_size当做attr传入。