Skip to content
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.

Add gather tests #1399

Merged
merged 7 commits into from
Jun 1, 2023
Merged

Conversation

zrr1999
Copy link
Member

@zrr1999 zrr1999 commented May 6, 2023

介绍

From #1378

为gather算子增加新的测试用例

算子类型

  • ElementWise:输入张量索引和输出张量索引之间存在一对一的对应关系
  • Broadcast:输入张量索引和输出张量索引之间存在一对多的对应关系
  • Injective:单射算子,可以将一个输出 axis 映射到一个输入 axis
  • Reduction:输入张量索引和输出张量索引之间存在多对一的对应关系
  • OutFusible:复杂算子,仍然可以将一对一的算子融合到其输出中。
  • kNonFusible:无法融合的算子

Test Cases Checklist

张量维度

  • 1D 张量
  • 2D 张量
  • 3D 张量
  • 4D 张量

special shape

4D 张量 测试如下情况
其中一个维度为 1
其中一个维度小于 1024
其中一个维度大于 1024
向量的所有维度都是 1

张量数据类型

"float32", "float64", "int8", "int16", "int32", "int64", "uint8"

属性:属性类型-可取值

axis
在2D张量分别测试0,1;在3D张量分别测试-3,-2,-1 。

@paddle-bot
Copy link

paddle-bot bot commented May 6, 2023

Thanks for your contribution!

@zrr1999 zrr1999 changed the title add gather tests Add gather tests May 6, 2023
@zrr1999 zrr1999 marked this pull request as ready for review May 6, 2023 16:41
@luotao1 luotao1 added the HappyOpenSource 快乐开源活动issue与PR label May 17, 2023
@thisjiang thisjiang self-requested a review May 25, 2023 09:59
python/tests/ops/test_gather_op.py Outdated Show resolved Hide resolved
python/tests/ops/test_gather_op.py Show resolved Hide resolved
Copy link
Collaborator

@thisjiang thisjiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@thisjiang thisjiang merged commit e38b000 into PaddlePaddle:develop Jun 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
contributor HappyOpenSource 快乐开源活动issue与PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants