| fix(gated_delta_rule): rename global test variables to avoid ODR violation in opapi UT
Co-authored-by: huang-chuhong<huangchuhong1@h-partners.com>
# message auto-generated for no-merge-commit merge:
!5747 merge fix/gated-delta-rule-opapi-ut-rename into master
fix(gated_delta_rule): rename global test variables to avoid ODR violation in opapi UT
Created-by: huang-chuhong
Commit-by: huang-chuhong
Merged-by: cann-robot
Description: ## 描述
recurrent_gated_delta_rule 与 chunk_gated_delta_rule 的 opapi UT 文件中均声明了同名全局变量 test,联合编译时触发 ODR(One Definition Rule)冲突,导致链接失败(multiple definition of test)。
## 改动
- 将 recurrent_gated_delta_rule opapi UT 中 test 重命名为 rgdr_test
- 将 chunk_gated_delta_rule opapi UT 中 test 重命名为 cgdr_test
- 变量名带算子缩写前缀,避免不同算子 UT 之间命名冲突,不影响单个算子独立编译行为
## 关联的Issue
#2596
## 测试
- bash build.sh -u --opapi --ops=recurrent_gated_delta_rule,chunk_gated_delta_rule:42 tests PASSED(chunk 20 recurrent 22)
- bash build.sh -u --opapi --ops=recurrent_gated_delta_rule:22 tests PASSED(单独编译不受影响)
## 类型标签
- [x] 🐛 Bug 修复
- [ ] ✨ 新特性
- [ ] ⚡ 性能优化
- [ ] ♻️ 重构
- [ ] 🧪 测试
- [ ] 📦 构建/CI
- [ ] 🔧 配置变更
- [ ] 📝 文档更新
- [ ] ⬆️ 依赖升级
- [ ] 🔒 安全修复
- [ ] 🧹 代码清理
- [ ] ❓ 其他,请描述:
See merge request: cann/ops-transformer!5747 | 11 天前 |