Skip to content

sigmoid.cu文件修改Ss Ks之后,kernel输出与pytorch输出不能对齐 #379

@GeneralJing

Description

@GeneralJing

sigmoid.py文件修改Ss、Ks之后,比较kernel的输出与通过pytorch算子得到的输出不能对齐,这块看kernel里面的实现应该是没有考虑当线程数跟Ks不匹配的时候会导致元素有遗漏,同时,核函数调用的时候grid和block也需要调整,其他的.cu文件可能也有类似的现象。
另外,.cu编译的时候会有报错,我用的是知乎上提供的那个nv的镜像环境,按说应该是满足要求的
error:no suitable user-defined conversion from "__half" to "__nv_bfloat16" exists
y[idx] = f/ (f + hexp(-v));
这个hexp函数。
不知道为什么会有这个报错,暂时用自定义函数代替了。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions