【Hackathon 4th No.54】为 Paddle allclose、isclose 算子实现 float16 数据类型支持 #50900
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.
PR types
New features
PR changes
OPs
Describe
优化思路
tensor
的元素加载到共享内存中,然后在共享内存上进行比较。这种方法将减少全局内存访问次数,从而提高访问效率。(但是对于小数量可能反而会增加线程同步的开销,导致性能下降)tensor
只读。添加__restrict__
关键字,编译器就可以更好地对代码进行优化