Closed
swi_glu 造数脚本用了未定义的 data_a / do_gelu,一跑即 NameError #6439
eieieiAdd on Oct 9Closed at 26 days ago
yuning_chen
Oct 9 Comments:
Oct 9 Comments:
Oct 9 Assign east_yang as responsible person
26 days ago Close issue
26 days ago Added label: resolved
25 days ago Associated pull request


现象
activation/swi_glu/tests/ut/op_kernel/swi_glu_data/gen_data.py由 gelu 模板复制而来、两个名字在本文件根本不存在,一跑即 NameError:gen_golden_data_simple里定义了data_x(data_x = np.random.uniform(...)),但下一行tensor_x = torch.from_numpy(data_a)用的是data_a(全文件未定义)→NameError: name 'data_a' is not defined。def do_swiglu(a,b),但调用处写y = do_gelu(a,b),do_gelu未定义 →NameError: name 'do_gelu' is not defined。影响
运行 swi_glu 的 golden 造数脚本(产出 input_x.bin / output_y_golden.bin 供 UT 使用)会在上述任一行崩溃,UT 测试数据无法生成。
期望
data_a→data_x;do_gelu→do_swiglu。