| Files | Last commit | Last update |
|---|---|---|
[CANNBot]add FresnelSin operator Co-authored-by: handsomeRobot_SK<suke13@huawei.com> Co-authored-by: handsomeRobot_SK<2034073486@qq.com> # message auto-generated for no-merge-commit merge: !3644 merge master into master [CANNBot]add FresnelSin operator Created-by: handsomeRobot_SK Commit-by: handsomeRobot_SK Merged-by: cann-robot Description: # feat: add FresnelSin operator ## 概述 新增 FresnelSin 算子,计算 **Fresnel 正弦积分** \[ S(x) = \int_0^x \sin\left(\frac{\pi t^2}{2}\right) dt \] 对标 TensorFlow 的 tf.math.special.fresnel_sin 实现。 --- ## 支持规格 | 项目 | 说明 | |------------|-------------------------------| | 数据类型 | float16, float32, bfloat16 | | 目标芯片 | Ascend 950 (arch35) | | 接口类型 | GE IR(无 ACLNN) | --- ## 算法实现 基于 Cephes 库 fresnl.c 的分段逼近策略: - **小值分支**(\(x^2 < 2.5625\)): 有理逼近 \[ S(|x|) = |x|^3 \cdot \frac{P_S(x^*)}{Q_S(x^*)} \] 其中 \(x^* = x^2\),\(P_S\)、\(Q_S\) 为特定多项式系数。 - **渐近分支**(\(x^2 \ge 2.5625\)): \[ S(|x|) = 0.5 - \frac{f \cdot \cos(z) + g \cdot \sin(z)}{\pi |x|} \] 其中 \(z = \frac{\pi x^2}{2}\),\(f\)、\(g\) 由辅助函数计算。 - **特殊值处理**: - NaN → NaN - ±Inf → ±0.5 - **符号恢复**:利用奇函数性质 \(S(-x) = -S(x)\) 保证数值正确。 --- ## 新增文件 | 文件路径 | 说明 | |----------|------| | math/fresnel_sin/CMakeLists.txt | 构建配置 | | math/fresnel_sin/op_graph/fresnel_sin_proto.h | GE IR 算子注册 | | math/fresnel_sin/op_host/fresnel_sin_def.cpp | 算子定义(dtype/format/config) | | math/fresnel_sin/op_host/fresnel_sin_infershape.cpp | 形状推导(输出 = 输入) | | math/fresnel_sin/op_host/arch35/fresnel_sin_tiling_arch35.cpp | Tiling 策略(多核分块 + UB 规划) | | math/fresnel_sin/op_kernel/arch35/fresnel_sin.h | Kernel 核心实现(Cephes 系数 + Horner 求值) | | math/fresnel_sin/op_kernel/arch35/fresnel_sin_tiling_data.h | Tiling 数据结构 | | math/fresnel_sin/op_kernel/arch35/fresnel_sin_tiling_key.h | 模板参数声明 | | math/fresnel_sin/op_kernel/fresnel_sin_apt.cpp | Kernel 入口 | | math/fresnel_sin/examples/test_geir_fresnel_sin.cpp | GE IR 精度验证(10 个 L1 用例) | | math/fresnel_sin/examples/arch35/test_geir_fresnel_sin.cpp | arch35 精度验证 | --- ## 精度标准 | dtype | rtol | |------------|--------| | float32 | 1e-4 | | float16 | 1e-3 | | bfloat16 | 4e-3 | --- ## UB Buffer 规划 - 输入队列 qIn :1 × sizeof(T) - 输出队列 qOut :1 × sizeof(T) - 计算队列 calcQ :8 × sizeof(float) - 掩码队列 maskQ :3 × sizeof(uint8_t) See merge request: cann/ops-math!3644 | 4 months ago | |
[fix] 插件归位 Co-authored-by: nextyale<yaochen15@huawei.com> # message auto-generated for no-merge-commit merge: !4626 merge issue2302 into master [fix] 插件归位 Created-by: nextyale Commit-by: nextyale Merged-by: cann-robot Description: ## 描述 迁移算子插件到对应目录 ## 关联的Issue https://gitcode.com/cann/ops-math/issues/2302 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他,请描述: 迁移插件 See merge request: cann/ops-math!4626 | 2 months ago | |
legacy下线:为AdaCast/SignBitsUnpack/Sinh/Spence/Tan新增tiling/infer调试日志+op_graph InferDataType迁移 Co-authored-by: zhouxuan78<zhouxuan78@huawei.com> # message auto-generated for no-merge-commit merge: !4498 merge master into master legacy下线:为AdaCast/SignBitsUnpack/Sinh/Spence/Tan新增tiling/infer调试日志+op_graph InferDataType迁移 Created-by: zhouxuan78 Commit-by: zhouxuan78 Merged-by: cann-robot Description: ## 描述 Legacy包下线整改:为AdaCast/SignBitsUnpack/Sinh/Spence/Tan 5个算子新增tiling/infer调试日志,补充spence op_graph InferDataType迁移。 ## 变更内容 - tiling入口新增OP_LOGD锚点日志,TilingData新增OP_LOGI日志 - InferShape新增OP_LOGI输出日志 - 补充spence_graph_infer.cpp(InferDataType迁移到op_graph,IMPL_OP注册) ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> ## 测试 <!-- 描述您如何测试这些更改。--> ## 文档更新 <!-- 如果有文档更新,请在这里描述。--> ## 类型标签 - [ ] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [x] 其他:Legacy包下线整改 See merge request: cann/ops-math!4498 | 2 months ago | |
fix(fresnel_sin): guard null GM base address and cap per-core split lengths Co-authored-by: wang-gang<wanggang414@h-partners.com> # message auto-generated for no-merge-commit merge: !6849 merge fix/fresnel-sin-ci-format into master fix(fresnel_sin): guard null GM base address and cap per-core split lengths Created-by: wang-gang Commit-by: wang-gang Merged-by: cann-robot Description: ## 描述 FresnelSin kernel performs an unchecked GM base address dereference in Init(): for oversized tensors (e.g. 2^32 fp32 elements) the GM allocation may fail and the framework hands over a null base address, so the first CopyIn reads address 0x0 (mSAN reports 2x illegal read of size 1 on GM). The host tiling also stores the per-core split lengths in uint32_t fields while the total element count is int64, which can silently truncate for element counts beyond the uint32 range. Changes: - op_kernel/arch35/fresnel_sin.h: add a null-pointer guard in Init() so the kernel bails out before any GM access, and guard Process() against zero-length work (avoids the loopCount division by zero when Init() returns early). - op_host/arch35/fresnel_sin_tiling.cpp: reject per-core split lengths beyond UINT32_MAX right at the narrowing point in FresnelSinTilingFunc(), so any length that the static_cast<uint32_t> of baseLength/tailLength would silently truncate fails fast in the host tiling with an explicit error, without rejecting large total element counts that the kernel itself supports. The FresnelSinTilingData layout is intentionally unchanged (no uint64 widening of baseLength/tailLength): the new host-side limit makes truncation unreachable, and keeping the layout avoids cross-component compatibility risk. ## 关联的Issue https://gitcode.com/wangyueting/changwei_gaoxiang/issues/18 ## 测试 - pre-commit checks (clang-format 18.1.8, OAT compliance, codespell) verified locally with the same hook versions as CI; the two touched files now pass clang-format --style=file --dry-run -Werror cleanly. - Local environment has no NPU device / CANN toolkit, so the mSAN reproduction (shape (1, 4294967296, 1, 1, 1) fp32) could not be run locally; verification relies on CI plus an mSAN rerun of the L1 upboundary cases. - Static code review: OP_CHECK_IF/OP_LOGE/UINT32_MAX usage follows existing conventions in this repo (e.g. split_v_tiling.cpp); the guard in Process() prevents a division-by-zero UB on the early-return path; normal-path behavior is unchanged. ## 文档更新 None ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!6849 | 7 days ago | |
fix(fresnel_sin): guard null GM base address and cap per-core split lengths Co-authored-by: wang-gang<wanggang414@h-partners.com> # message auto-generated for no-merge-commit merge: !6849 merge fix/fresnel-sin-ci-format into master fix(fresnel_sin): guard null GM base address and cap per-core split lengths Created-by: wang-gang Commit-by: wang-gang Merged-by: cann-robot Description: ## 描述 FresnelSin kernel performs an unchecked GM base address dereference in Init(): for oversized tensors (e.g. 2^32 fp32 elements) the GM allocation may fail and the framework hands over a null base address, so the first CopyIn reads address 0x0 (mSAN reports 2x illegal read of size 1 on GM). The host tiling also stores the per-core split lengths in uint32_t fields while the total element count is int64, which can silently truncate for element counts beyond the uint32 range. Changes: - op_kernel/arch35/fresnel_sin.h: add a null-pointer guard in Init() so the kernel bails out before any GM access, and guard Process() against zero-length work (avoids the loopCount division by zero when Init() returns early). - op_host/arch35/fresnel_sin_tiling.cpp: reject per-core split lengths beyond UINT32_MAX right at the narrowing point in FresnelSinTilingFunc(), so any length that the static_cast<uint32_t> of baseLength/tailLength would silently truncate fails fast in the host tiling with an explicit error, without rejecting large total element counts that the kernel itself supports. The FresnelSinTilingData layout is intentionally unchanged (no uint64 widening of baseLength/tailLength): the new host-side limit makes truncation unreachable, and keeping the layout avoids cross-component compatibility risk. ## 关联的Issue https://gitcode.com/wangyueting/changwei_gaoxiang/issues/18 ## 测试 - pre-commit checks (clang-format 18.1.8, OAT compliance, codespell) verified locally with the same hook versions as CI; the two touched files now pass clang-format --style=file --dry-run -Werror cleanly. - Local environment has no NPU device / CANN toolkit, so the mSAN reproduction (shape (1, 4294967296, 1, 1, 1) fp32) could not be run locally; verification relies on CI plus an mSAN rerun of the L1 upboundary cases. - Static code review: OP_CHECK_IF/OP_LOGE/UINT32_MAX usage follows existing conventions in this repo (e.g. split_v_tiling.cpp); the guard in Process() prevents a division-by-zero UB on the early-return path; normal-path behavior is unchanged. ## 文档更新 None ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!6849 | 7 days ago | |
fix(fresnel_sin): guard null GM base address and cap per-core split lengths Co-authored-by: wang-gang<wanggang414@h-partners.com> # message auto-generated for no-merge-commit merge: !6849 merge fix/fresnel-sin-ci-format into master fix(fresnel_sin): guard null GM base address and cap per-core split lengths Created-by: wang-gang Commit-by: wang-gang Merged-by: cann-robot Description: ## 描述 FresnelSin kernel performs an unchecked GM base address dereference in Init(): for oversized tensors (e.g. 2^32 fp32 elements) the GM allocation may fail and the framework hands over a null base address, so the first CopyIn reads address 0x0 (mSAN reports 2x illegal read of size 1 on GM). The host tiling also stores the per-core split lengths in uint32_t fields while the total element count is int64, which can silently truncate for element counts beyond the uint32 range. Changes: - op_kernel/arch35/fresnel_sin.h: add a null-pointer guard in Init() so the kernel bails out before any GM access, and guard Process() against zero-length work (avoids the loopCount division by zero when Init() returns early). - op_host/arch35/fresnel_sin_tiling.cpp: reject per-core split lengths beyond UINT32_MAX right at the narrowing point in FresnelSinTilingFunc(), so any length that the static_cast<uint32_t> of baseLength/tailLength would silently truncate fails fast in the host tiling with an explicit error, without rejecting large total element counts that the kernel itself supports. The FresnelSinTilingData layout is intentionally unchanged (no uint64 widening of baseLength/tailLength): the new host-side limit makes truncation unreachable, and keeping the layout avoids cross-component compatibility risk. ## 关联的Issue https://gitcode.com/wangyueting/changwei_gaoxiang/issues/18 ## 测试 - pre-commit checks (clang-format 18.1.8, OAT compliance, codespell) verified locally with the same hook versions as CI; the two touched files now pass clang-format --style=file --dry-run -Werror cleanly. - Local environment has no NPU device / CANN toolkit, so the mSAN reproduction (shape (1, 4294967296, 1, 1, 1) fp32) could not be run locally; verification relies on CI plus an mSAN rerun of the L1 upboundary cases. - Static code review: OP_CHECK_IF/OP_LOGE/UINT32_MAX usage follows existing conventions in this repo (e.g. split_v_tiling.cpp); the guard in Process() prevents a division-by-zero UB on the early-return path; normal-path behavior is unchanged. ## 文档更新 None ## 类型标签 <!-- [x] 表示选中 --> - [x] Bug修复 - [ ] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!6849 | 7 days ago | |
适配ascend350 Co-authored-by: Hana77<wangtianqi27@huawei.com> # message auto-generated for no-merge-commit merge: !6165 merge dvlite into master 适配ascend350 Created-by: Hana77 Commit-by: Hana77 Merged-by: cann-robot Description: ## 描述 <!--在这里详细描述你的改动,包括改动的原因和所采取的方法。--> 算子适配ascend350 ## 关联的Issue <!-- 如果这个PR是为了解决特定的Issue,请在这里提供Issue链接。--> <!-- 如果这个PR是为了解决特定的问题单,请在这里描述问题单单号。--> [#3439](https://gitcode.com/cann/ops-math/issues/3439) ## 测试 <!--描述进行了哪些测试来验证你的改动。包括但不限于二级冒烟、算子泛化等。--> 二级冒烟 ## 文档更新 <!--如果这个PR包含文档的更新,请在这里指出。例如:更新了README.md文件。--> 不涉及 ## 类型标签 <!-- [x] 表示选中 --> - [ ] Bug修复 - [x] 新特性 - [ ] 性能优化 - [ ] 文档更新 - [ ] 其他,请描述: See merge request: cann/ops-math!6165 | 29 days ago | |
[fresnel_sin] quality-hardening:算子质量加固修复(准入+检视问题整改) Co-authored-by: handsomeRobot_SK<suke13@huawei.com> # message auto-generated for no-merge-commit merge: !6194 merge fresnel_sin_quality_hardening into master [fresnel_sin] quality-hardening:算子质量加固修复(准入+检视问题整改) Created-by: handsomeRobot_SK Commit-by: handsomeRobot_SK Merged-by: cann-robot Description: # [fresnel_sin] quality-hardening:算子质量加固修复(准入+检视问题整改) ## 一、变更概述 本 PR 为 fresnel_sin 算子转测准入(ops-admission-scan 白盒)+ 代码检视(ascendc-code-review file-review 全量)双报告问题的整改合入: - **准入扫描(2026-09-23)**:唯一真实 FAIL 为 ascend950 ini [FresnelSin] section 残留(P-E3,已由上游 canndev legacy 下线删除闭环);另一自动化 FAIL(15.5 f_dtype)经人工复核为 README "DOUBLE" 措辞被 dtype 正则误命中的工具误报;另有提示级问题 P-D/P-D2/P-INFO。 - **代码检视(2026-09-23)**:LOG-1 裸 OP_LOGE FAIL 5 处(H1-H5)、SUSPICIOUS 6 项(L1-L6)、设计一致性偏差 5 项(M1-M5)、风格 3 项(S1-S3)、文档格式 3 处(D1-D3)。 修复对象覆盖主线(math/fresnel_sin/,GE 交付主体,TBE 结构)与实验侧(experimental/math/fresnel_sin/,Ascend C l0op + aclnn 两段式)**双实现**:日志结构化、UB 容量校验、TilingData 字段整治、输出舍入模式对齐、大值截断机制显式化(两实现口径一致)等;交付件 DESIGN.md/REQUIREMENTS.md 同步至 v1.1,测试用例补齐空 tensor/边界/压力用例。共 7 个代码 commit(基线 2a12b1423 起)+ 2 个交付件同步 commit(625b165/8a47e70 中本算子部分)。 **适用审阅视角**:主线/实验侧均为 kernel + tiling + host 混合改动;无属性算子(proto/def 无 ATTR),无 TensorList/SIMT/MC2 路径介入。 ## 二、分类修改清单 ### (一)代码(ops-math 仓,主线 math/fresnel_sin + 实验侧 experimental/math/fresnel_sin) | 文件(范围) | 修改内容 | 对应问题 | |---|---|---| | 实验侧 op_host/arch35/fresnel_sin_tiling.cpp | H1/H2 裸 OP_LOGE 改结构化宏(EZ0016/EZ0007);新增 GetTileUbBytes() UB 容量校验(不足报错);删除只写不读字段写入(L5);4 处单行 if 补大括号(S2) | H1/H2、L2、L5、S2 | | 实验侧 op_kernel/arch35/fresnel_sin_tiling_data.h | baseLength/tailLength 由 uint32_t 改 int64_t,防 GM 偏移截断 | L1 | | 实验侧 op_kernel/arch35/fresnel_sin.h | 输出 Cast 由 CAST_NONE 改 CAST_RINT(M1);1e-30f 魔数命名 EPS_GUARD(L3) | M1、L3 | | 实验侧 op_api/aclnn_fresnel_sin.cpp、op_api/fresnel_sin.cpp | 3 处裸 OP_LOGE 改 OP_LOGE_WITH_INVALID_INPUT_DTYPE / OP_LOGE_FOR_INVALID_SHAPES_WITH_REASON(H3/H4/H5) | H3/H4/H5 | | 实验侧 op_api/aclnn_fresnel_sin.h | 头注释空 tensor 措辞明确化(0-8 维任意 shape 含空 tensor) | P-D2 | | 主线 op_kernel/arch35/fresnel_sin.h | 死代码清理(未用常量、被覆盖的 NaN 掩码 Compare,L4);恢复 ASYM_THRESH=36974.0f 并接入 CompareScalar(GE) 显式截断分支(L6);单行 if 补大括号、成员变量分行声明(S1/S3) | L4、L6、S1、S3 | 修复机制说明(L6):主线大值截断由原先 |x|==|x|+1 饱和(≈2^24 起触发)改为显式 |x|≥36974(GE)阈值分支,[36974, 2^24) 区间按 DESIGN §1.3 显式截断为 sign(x)*0.5,±Inf 同落该掩码,与实验侧 maskClamp(Compare(maskClamp, |x|, 36974, GE))口径一致;结果数值等价,两实现机制对齐。 ### (二)资料(operator-artifacts/fresnel_sin 交付件) | 文件 | 修改内容 | 对应问题 | |---|---|---| | DESIGN.md(v1.1) | workspace 非 0(系统 Sin/Cos 临时空间)说明、arch22 未实现状态说明、双实现 TilingKey/TilingData 差异记录、输出 Cast 舍入 CAST_RINT、主线大值截断机制说明 | M3/M4/M5 收口 + L6 机制同步 | | REQUIREMENTS.md(v1.1) | workspaceSize 参数口径修正(GetLibApiWorkSpaceSize,可能非 0;空 tensor 时为 0)、Workspace/资源约束章节同步、GE 图模式静态/动态 shape 支持标记修正;"0-8 维" 空格清理(D1/D2) | M3/M4 + D1/D2 | | DESIGN.md:414 | "248 KB" 改 "248KB"(D3);v1.1 版本历史留痕 | D3 | ### (三)用例(operator-artifacts/fresnel_sin/测试用例) - fresnel_sin_tf_e2e_cases.csv:新增 18 条——rank5-8 各 1、1GiB 压力 fp32/fp16/bf16 各 1、特殊值(±0、NaN、±Inf)三 dtype 各 1、空 tensor 1D(fp16/bf16)与 2D 0×3(fp32/fp16/bf16)共 5、边界值(fp32 max/denorm、fp16 max/min、bf16)3; - test_cases_spec.csv:新增 5 条**空 tensor 边界用例**(1D 空、2D 0×3,fp16/bf16/fp32,带容差列),补齐覆盖度报告指出的空 tensor 专项用例缺口。 ## 三、逐 commit 摘要表 ops-math 分支(基线 2a12b1423 → HEAD,7 个): | # | commit | 标题 | 涉及文件 | 对应问题 | |---|---|---|---|---| | 1 | 32fc3c64c | fix: 实验侧 tiling LOG-1 结构化日志+UB 容量校验+TilingData 字段整治 | 实验侧 tiling.cpp、tiling_data.h | H1/H2、L1、L2、L5 | | 2 | ffcd16efe | fix: 实验侧 kernel 输出 Cast 改 CAST_RINT+命名 1e-30f 魔数 | 实验侧 kernel fresnel_sin.h | M1、L3 | | 3 | 8319a90ed | fix: 清理主线 kernel 死代码 | 主线 kernel fresnel_sin.h | L4 | | 4 | fa23a8441 | docs: 修正 aclnn 头注释空 tensor 措辞 | 实验侧 aclnn_fresnel_sin.h | P-D2 | | 5 | 34e9e4786 | fix: op_api 三处裸 OP_LOGE 改用结构化预定义宏 | 实验侧 aclnn_fresnel_sin.cpp、fresnel_sin.cpp | H3/H4/H5 | | 6 | 84d83c99e | style: 补齐 STYLE-2.4 大括号与 STYLE-2.8 变量分行 | 实验侧 tiling.cpp、主线 kernel fresnel_sin.h | S1/S2/S3 | | 7 | 02039ad1e | fix: 主线显式实现 36974 大值截断阈值(L6) | 主线 kernel fresnel_sin.h | L6 | 交付件同步(operator-artifacts 仓,本算子部分): | # | commit | 标题 | 涉及文件 | 对应问题 | |---|---|---|---|---| | 8 | 625b165 | quality-hardening: 19算子批量修复(本算子部分) | fresnel_sin/DESIGN.md(v1.1)、REQUIREMENTS.md(v1.1)、测试用例/fresnel_sin_tf_e2e_cases.csv(+18)、test_cases_spec.csv(+5) | M3/M4/M5、D1-D3、用例补齐 | | 9 | 8a47e70 | quality-hardening: 第二轮补修(本算子部分) | fresnel_sin/DESIGN.md(区间3 阈值符号 GT→GE、"两实现一致"口径)、REQUIREMENTS.md | L6 交付件口径同步 | 外部闭环:P-E3(ascend950 ini [FresnelSin] 残留)随 canndev 上游 legacy 下线提交(2026-09-18,删除含 FresnelSin 在内 20 个算子的 ascend950 ini 段)删除;已复核当前 ascend950 ini 无该 section。 ## 四、测试与验证 ### 构建(主线/实验侧两套实现均覆盖) - **主线包全量构建**(含 kernel bin 重编):通过(commit 02039ad1e 验证记录); - **实验侧全量构建**:通过(commit 34e9e4786 验证记录,含 opapi 目标日志栈隔离改动); - **代码风格**:clang-format dry-run 校验通过,大括号/分行整改不被格式化工具回退(commit 84d83c99e 验证记录)。 ### 白盒准入复扫(无 NPU 静态证据) - P-E3 修复后准入扫描无残留 FAIL 项(15.5 f_dtype 为工具误报另案,见未完成事项); - 异常三层检测(Tiling/op_api/LLM 审视)与工程规范 6 项(E1-E6)均 PASS; - 用例覆盖度:kernel 侧 95.9%、aclnn 侧 81.2%,均 PASS(≥80%),空 tensor 用例已按此轮改动补齐。 ### UT 与真机 - **UT**:受本地环境限制(ophost UT 进程无法找到算子 impl 注册 "not found FresnelSin",同仓 abs/fresnel_cos 对照也全挂),UT 未能跑通,待环境修复后复跑;本 PR 未改 UT 代码; - **精度/性能**:无 NPU 环境,未新增实测;沿用交付件历史精度/性能报告(operator-artifacts/fresnel_sin/测试报告/,2026-09-15/18,scipy golden 两方/三方)。M1(CAST_RINT)与 L6(显式 36974 阈值)均为机制对齐类修改:前者直接降低 fp16/bf16 舍入误差,后者数值与原饱和路径等价(区间 3 输出恰为 ±0.5 边界值),预期不影响既有精度结论,真机验证随转测执行。 ## 五、未完成事项与限制(审阅须知) ### 三禁区声明(需架构/产品裁决,不在本 PR 范围) 1. **ACLNN 接口交付范围未定**(admission P-D):实验侧手写 aclnn 两段式接口存在但当前 ACLNNTYPE=aclnn_exclude + DISABLE_IN_OPP,全仓无 docs/aclnnFresnelSin.md。若实验侧随交付则需补文档(含错误码表,覆盖 ACLNN_ERR_PARAM_NULLPTR/PARAM_INVALID);此 PR 未动 aclnn 交付配置与文档目录结构。 2. **910B(arch22/DAV_2201)产品支持矛盾**(code-review M2):spec.yaml/REQUIREMENTS/README 声明支持 Ascend910B,实现仅 arch35 且 l0op 强制 DAV_3510,无 op_kernel/arch22 目录;DESIGN v1.1 仅记录了"arch22 未实现"状态说明,spec/需求的声明未改动(删声明或补实现属产品决策)。 3. **主线(GE)与实验侧(Ascend C)双实现并存,交付侧别未收敛**(admission P-INFO + 检视附注 3):两实现算法同源但接口/结构差异大,REG_OP(FresnelSin) 仅主线有;收敛其一属大改动,需架构裁决。DESIGN v1.1 §3.2/§3.3 已记录双实现差异,未做收敛决策。 ### 环境限制 - **无 NPU/TTK**:GEIR TTK 动态 shape 真机测试、异常输入真机实测(admission 标记 UNAVAILABLE)及覆盖度报告残留缺口(DT_INT32 边界 ±2.14748e+09、UB 整除、aclnn 异常用例部分)未补证,待转测拿到 NPU 后执行 run_ttk_geir.sh / run_ttk_exception.sh 并回填测试报告目录。 ### 已知未修低危项 / 工具冲突 - README 约束说明 "不支持DOUBLE(FP64)" 措辞仍会触发扫描器 dtype 正则误报(P-W1,为规避需确认扫描器口径的文档措辞改动);无有意设计类未修项。 以上 5 项未修项的完整条目、决策人与修复条件,见 /home/s00947152/LongTail/guide/未修项明细/fresnel_sin_未修项明细.md。 See merge request: cann/ops-math!6194 | 27 days ago |
FresnelSin
产品支持情况
| 产品 | 是否支持 |
|---|---|
| Ascend 950PR&950DT系列产品 | √ |
| Atlas A3系列产品 | √ |
| Atlas A2系列产品 | √ |
| Atlas 200I/500 A2推理产品 | × |
| Atlas推理系列产品 | √ |
| Atlas训练系列产品 | √ |
功能说明
-
算子功能:计算Fresnel正弦积分 S(x) = integral_0^x sin(pi*t^2/2) dt。
-
计算公式:
S(x)=∫0xsin(π2t2)dtS(x) = \int_{0}^{x} \sin\left(\frac{\pi}{2} t^{2}\right) \mathrm{d}t S(x)=∫0xsin(2πt2)dt
参数说明
| 参数名 | 输入/输出/属性 | 描述 | 数据类型 | 数据格式 |
|---|---|---|---|---|
| x | 输入 | 待进行Fresnel正弦积分计算的入参,公式中的x。 | BFLOAT16、FLOAT16、FLOAT | ND |
| y | 输出 | Fresnel正弦积分计算的出参,公式中的S(x)。 | BFLOAT16、FLOAT16、FLOAT | ND |
约束说明
- 不支持DOUBLE(FP64)数据类型。
- x 的维度数(rank)范围为 0~8,支持 0 维标量输入。
- 支持空 Tensor(0 元素)输入:Host 侧 Tiling 短路直接返回,输出为同 shape 空 Tensor(自动处理)。
- 支持非连续 Tensor 输入(Host 侧自动处理)。
- 动态 shape 支持情况:支持动态 shape 与动态 rank(-1 未知维度 / -2 未知 rank)。
调用说明
| 调用方式 | 调用样例 | 说明 |
|---|---|---|
| 图模式调用 | test_geir_fresnel_sin | 通过图模式调用FresnelSin算子。 |