| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Co-authored-by: 我是石头人大王<luohao148@huawei.com> # message auto-generated for no-merge-commit merge: !608 merge diff into master non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Created-by: lhlll Commit-by: 我是石头人大王 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> | 序号 |算子|功能| |--|--|--| | 1 | non_zero| 找出 self中非零元素的位置,设self的维度为D,self中非零元素的个数为N,则返回out的shape为N * D,每一列表示一个非零元素的位置坐标。| | 2| nll_loss|计算负对数似然损失值。 | | 3| nll_loss_grad | 负对数似然损失反向计算。 | | 4| adam_apply_one| 对单个模型参数(Variable)执行 Adam 算法的完整参数更新逻辑 | | 5| adam_apply_one_with_decay | 该算子是自定义融合算子,是Adam优化器算法的变种 | | 6| adam_apply_one_with_decay_assign| 该算子是自定义融合算子,与网络优化器相关,是一种参数更新的算法 | | 7| apply_gradient_descent| 根据计算出的梯度(Gradient)和预设的学习率(Learning Rate),按照梯度下降规则更新模型参数,是模型训练中参数优化的基础操作。 | | 8| ascend_quant| 对输入x进行量化操作,且scale和offset的size需要是x的最后一维或1。 | | 9| quantize| 对输入张量x进行量化处理。 | ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/310 <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!608 | 8 个月前 | |
non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Co-authored-by: 我是石头人大王<luohao148@huawei.com> # message auto-generated for no-merge-commit merge: !608 merge diff into master non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Created-by: lhlll Commit-by: 我是石头人大王 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> | 序号 |算子|功能| |--|--|--| | 1 | non_zero| 找出 self中非零元素的位置,设self的维度为D,self中非零元素的个数为N,则返回out的shape为N * D,每一列表示一个非零元素的位置坐标。| | 2| nll_loss|计算负对数似然损失值。 | | 3| nll_loss_grad | 负对数似然损失反向计算。 | | 4| adam_apply_one| 对单个模型参数(Variable)执行 Adam 算法的完整参数更新逻辑 | | 5| adam_apply_one_with_decay | 该算子是自定义融合算子,是Adam优化器算法的变种 | | 6| adam_apply_one_with_decay_assign| 该算子是自定义融合算子,与网络优化器相关,是一种参数更新的算法 | | 7| apply_gradient_descent| 根据计算出的梯度(Gradient)和预设的学习率(Learning Rate),按照梯度下降规则更新模型参数,是模型训练中参数优化的基础操作。 | | 8| ascend_quant| 对输入x进行量化操作,且scale和offset的size需要是x的最后一维或1。 | | 9| quantize| 对输入张量x进行量化处理。 | ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/310 <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!608 | 8 个月前 | |
non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Co-authored-by: 我是石头人大王<luohao148@huawei.com> # message auto-generated for no-merge-commit merge: !608 merge diff into master non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Created-by: lhlll Commit-by: 我是石头人大王 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> | 序号 |算子|功能| |--|--|--| | 1 | non_zero| 找出 self中非零元素的位置,设self的维度为D,self中非零元素的个数为N,则返回out的shape为N * D,每一列表示一个非零元素的位置坐标。| | 2| nll_loss|计算负对数似然损失值。 | | 3| nll_loss_grad | 负对数似然损失反向计算。 | | 4| adam_apply_one| 对单个模型参数(Variable)执行 Adam 算法的完整参数更新逻辑 | | 5| adam_apply_one_with_decay | 该算子是自定义融合算子,是Adam优化器算法的变种 | | 6| adam_apply_one_with_decay_assign| 该算子是自定义融合算子,与网络优化器相关,是一种参数更新的算法 | | 7| apply_gradient_descent| 根据计算出的梯度(Gradient)和预设的学习率(Learning Rate),按照梯度下降规则更新模型参数,是模型训练中参数优化的基础操作。 | | 8| ascend_quant| 对输入x进行量化操作,且scale和offset的size需要是x的最后一维或1。 | | 9| quantize| 对输入张量x进行量化处理。 | ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/310 <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!608 | 8 个月前 | |
补齐A5算子op_graph下面的cmakelist、同步修改apply_adam_w算子geir通路动态用例失败问题 Co-authored-by: t00850857<tanxin44@huawei.com> # message auto-generated for no-merge-commit merge: !714 merge master into master 补齐A5算子op_graph下面的cmakelist、同步修改apply_adam_w算子geir通路动态用例失败问题 Created-by: tan_xin Commit-by: t00850857 Merged-by: cann-robot Description: ## 描述 1、补齐A5elu、gelu、gather_v2等算子op_graph下面的cmakelist 2、同步修改apply_adam_w算子geir通路动态用例失败问题 ## 关联的Issue [[DTS2025122942281](https://dts-szv.clouddragon.huawei.com/DTSPortal/ticket/DTS2025122942281)] ApplyAdamW geir通路功能有用例静态成功动态失败 ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!714 | 8 个月前 | |
non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Co-authored-by: 我是石头人大王<luohao148@huawei.com> # message auto-generated for no-merge-commit merge: !608 merge diff into master non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Created-by: lhlll Commit-by: 我是石头人大王 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> | 序号 |算子|功能| |--|--|--| | 1 | non_zero| 找出 self中非零元素的位置,设self的维度为D,self中非零元素的个数为N,则返回out的shape为N * D,每一列表示一个非零元素的位置坐标。| | 2| nll_loss|计算负对数似然损失值。 | | 3| nll_loss_grad | 负对数似然损失反向计算。 | | 4| adam_apply_one| 对单个模型参数(Variable)执行 Adam 算法的完整参数更新逻辑 | | 5| adam_apply_one_with_decay | 该算子是自定义融合算子,是Adam优化器算法的变种 | | 6| adam_apply_one_with_decay_assign| 该算子是自定义融合算子,与网络优化器相关,是一种参数更新的算法 | | 7| apply_gradient_descent| 根据计算出的梯度(Gradient)和预设的学习率(Learning Rate),按照梯度下降规则更新模型参数,是模型训练中参数优化的基础操作。 | | 8| ascend_quant| 对输入x进行量化操作,且scale和offset的size需要是x的最后一维或1。 | | 9| quantize| 对输入张量x进行量化处理。 | ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/310 <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!608 | 8 个月前 | |
non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Co-authored-by: 我是石头人大王<luohao148@huawei.com> # message auto-generated for no-merge-commit merge: !608 merge diff into master non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Created-by: lhlll Commit-by: 我是石头人大王 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> | 序号 |算子|功能| |--|--|--| | 1 | non_zero| 找出 self中非零元素的位置,设self的维度为D,self中非零元素的个数为N,则返回out的shape为N * D,每一列表示一个非零元素的位置坐标。| | 2| nll_loss|计算负对数似然损失值。 | | 3| nll_loss_grad | 负对数似然损失反向计算。 | | 4| adam_apply_one| 对单个模型参数(Variable)执行 Adam 算法的完整参数更新逻辑 | | 5| adam_apply_one_with_decay | 该算子是自定义融合算子,是Adam优化器算法的变种 | | 6| adam_apply_one_with_decay_assign| 该算子是自定义融合算子,与网络优化器相关,是一种参数更新的算法 | | 7| apply_gradient_descent| 根据计算出的梯度(Gradient)和预设的学习率(Learning Rate),按照梯度下降规则更新模型参数,是模型训练中参数优化的基础操作。 | | 8| ascend_quant| 对输入x进行量化操作,且scale和offset的size需要是x的最后一维或1。 | | 9| quantize| 对输入张量x进行量化处理。 | ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/310 <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!608 | 8 个月前 | |
non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Co-authored-by: 我是石头人大王<luohao148@huawei.com> # message auto-generated for no-merge-commit merge: !608 merge diff into master non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Created-by: lhlll Commit-by: 我是石头人大王 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> | 序号 |算子|功能| |--|--|--| | 1 | non_zero| 找出 self中非零元素的位置,设self的维度为D,self中非零元素的个数为N,则返回out的shape为N * D,每一列表示一个非零元素的位置坐标。| | 2| nll_loss|计算负对数似然损失值。 | | 3| nll_loss_grad | 负对数似然损失反向计算。 | | 4| adam_apply_one| 对单个模型参数(Variable)执行 Adam 算法的完整参数更新逻辑 | | 5| adam_apply_one_with_decay | 该算子是自定义融合算子,是Adam优化器算法的变种 | | 6| adam_apply_one_with_decay_assign| 该算子是自定义融合算子,与网络优化器相关,是一种参数更新的算法 | | 7| apply_gradient_descent| 根据计算出的梯度(Gradient)和预设的学习率(Learning Rate),按照梯度下降规则更新模型参数,是模型训练中参数优化的基础操作。 | | 8| ascend_quant| 对输入x进行量化操作,且scale和offset的size需要是x的最后一维或1。 | | 9| quantize| 对输入张量x进行量化处理。 | ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/310 <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!608 | 8 个月前 | |
non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Co-authored-by: 我是石头人大王<luohao148@huawei.com> # message auto-generated for no-merge-commit merge: !608 merge diff into master non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Created-by: lhlll Commit-by: 我是石头人大王 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> | 序号 |算子|功能| |--|--|--| | 1 | non_zero| 找出 self中非零元素的位置,设self的维度为D,self中非零元素的个数为N,则返回out的shape为N * D,每一列表示一个非零元素的位置坐标。| | 2| nll_loss|计算负对数似然损失值。 | | 3| nll_loss_grad | 负对数似然损失反向计算。 | | 4| adam_apply_one| 对单个模型参数(Variable)执行 Adam 算法的完整参数更新逻辑 | | 5| adam_apply_one_with_decay | 该算子是自定义融合算子,是Adam优化器算法的变种 | | 6| adam_apply_one_with_decay_assign| 该算子是自定义融合算子,与网络优化器相关,是一种参数更新的算法 | | 7| apply_gradient_descent| 根据计算出的梯度(Gradient)和预设的学习率(Learning Rate),按照梯度下降规则更新模型参数,是模型训练中参数优化的基础操作。 | | 8| ascend_quant| 对输入x进行量化操作,且scale和offset的size需要是x的最后一维或1。 | | 9| quantize| 对输入张量x进行量化处理。 | ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/310 <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!608 | 8 个月前 | |
non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Co-authored-by: 我是石头人大王<luohao148@huawei.com> # message auto-generated for no-merge-commit merge: !608 merge diff into master non_zero, nll_loss, nll_loss_grad, adam_apply_one, adam_apply_one_with_decay, adam_apply_one_with_decay_assign, apply_gradient_descent, ascend_quant, quantize支持下一代实现 Created-by: lhlll Commit-by: 我是石头人大王 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> | 序号 |算子|功能| |--|--|--| | 1 | non_zero| 找出 self中非零元素的位置,设self的维度为D,self中非零元素的个数为N,则返回out的shape为N * D,每一列表示一个非零元素的位置坐标。| | 2| nll_loss|计算负对数似然损失值。 | | 3| nll_loss_grad | 负对数似然损失反向计算。 | | 4| adam_apply_one| 对单个模型参数(Variable)执行 Adam 算法的完整参数更新逻辑 | | 5| adam_apply_one_with_decay | 该算子是自定义融合算子,是Adam优化器算法的变种 | | 6| adam_apply_one_with_decay_assign| 该算子是自定义融合算子,与网络优化器相关,是一种参数更新的算法 | | 7| apply_gradient_descent| 根据计算出的梯度(Gradient)和预设的学习率(Learning Rate),按照梯度下降规则更新模型参数,是模型训练中参数优化的基础操作。 | | 8| ascend_quant| 对输入x进行量化操作,且scale和offset的size需要是x的最后一维或1。 | | 9| quantize| 对输入张量x进行量化处理。 | ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。例如:关联Issue #000--> https://gitcode.com/cann/ops-nn/issues/310 <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [x] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-nn!608 | 8 个月前 |
AscendQuant
产品支持情况
| 产品 | 是否支持 |
|---|---|
| Ascend 950PR/Ascend 950DT | √ |
| Atlas A3 训练系列产品/Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品/Atlas A2 推理系列产品 | √ |
功能说明
- 算子功能:对输入x进行量化操作,且scale和offset的size需要是x的最后一维或1。
- 计算公式:
-
sqrtMode为false时,计算公式为:
y=round((x∗scale)+offset)y = round((x * scale) + offset) y=round((x∗scale)+offset)
-
sqrtMode为true时,计算公式为:
y=round((x∗scale∗scale)+offset)y = round((x * scale * scale) + offset) y=round((x∗scale∗scale)+offset)
-
参数说明
| 参数名 | 输入/输出/属性 | 描述 | 数据类型 | 数据格式 |
|---|---|---|---|---|
| x | 输入 | 待进行ascend_quant计算的入参,公式中的x。 | FLOAT、FLOAT16 | ND |
| scale | 输入 | 待进行ascend_quant计算的入参,公式中的scale。 | FLOAT | ND |
| offset | 输入 | 待进行ascend_quant计算的入参,公式中的offset。 | FLOAT | ND |
| sqrt_mode | 输入 | 待进行ascend_quant计算的入参,公式中的sqrt_mode。 | BOOL | ND |
| round_mode | 输入 | 待进行ascend_quant计算的入参,公式中的round_mode。 | STRING | ND |
| dst_type | 输入 | 待进行ascend_quant计算的入参,公式中的dst_type。 | INT8 | ND |
| y | 输出 | 待进行ascend_quant计算的出参,公式中的y。 | INT8、INT4、HIFLOAT8 | ND |
- Atlas A2 训练系列产品/Atlas A2 推理系列产品、Atlas A3 训练系列产品/Atlas A3 推理系列产品:数据类型支持FLOAT32、FLOAT16、BFLOAT16。
约束说明
无
调用说明
| 调用方式 | 样例代码 | 说明 |
|---|---|---|
| aclnn接口 | test_aclnn_ascend_quant | 通过aclnnAscendQuant接口方式调用AscendQuant算子。 |