feat: complete assignment kernels #66
Open
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.
Description
本 PR 完成了 NineToothed Operators (ntops) 作业要求的全部算子实现。
主要工作包括在
src/ntops/kernels中实现算子逻辑,在src/ntops/torch中完成算子注册,并添加了相应的单元测试。Implemented Kernels
实现了以下算子:
Changes
Kernels:
src/ntops/kernels/index_add.pysrc/ntops/kernels/nonzero_sum_gt_last2.pysrc/ntops/kernels/one_hot.pysrc/ntops/kernels/topk.pysrc/ntops/kernels/where.pysrc/ntops/kernels/__init__.py导出模块Torch Registry:
src/ntops/torch/index_add.pysrc/ntops/torch/nonzero_sum_gt_last2.pysrc/ntops/torch/one_hot.pysrc/ntops/torch/topk.pysrc/ntops/torch/where.pysrc/ntops/torch/__init__.py注册算子Tests:
tests/test_index_add.pytests/test_nonzero_sum_gt_last2.pytests/test_one_hot.pytests/test_topk.pytests/test_where.pyTesting
所有新增测试用例均已在本地通过。