Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Tags: v2.1] Error behavior for 'flag_gems.pad(ref_x, pad_params, pad_mode, pad_value)' #268

Open
Dayrker opened this issue Oct 29, 2024 · 6 comments

Comments

@Dayrker
Copy link

Dayrker commented Oct 29, 2024

Describe the bug

位置:
FlagGems/tests/test_special_ops.py::test_pad
FlagGems/src/flag_gems/ops/pad.py
现象:

  1. res_out = flag_gems.pad(ref_x, pad_params, pad_mode, pad_value)使用会报错
    E cond = (dst_index_0 >= valid_dim0_start and dst_index_0 < valid_dim0_end)
    E ^
    E IncompatibleTypeErrorImpl('invalid operands of type pointer and triton.language.int32')
@StrongSpoon
Copy link
Collaborator

Please provide a minimal reproduction to help us solving this problem.
截屏2024-10-31 10 26 50

@Bowen12992
Copy link
Collaborator

Bowen12992 commented Oct 31, 2024

@MARD1NO hey, please hava a look

@MARD1NO
Copy link
Collaborator

MARD1NO commented Oct 31, 2024

Describe the bug

位置: FlagGems/tests/test_special_ops.py::test_pad FlagGems/src/flag_gems/ops/pad.py 现象:

  1. res_out = flag_gems.pad(ref_x, pad_params, pad_mode, pad_value)使用会报错
    E cond = (dst_index_0 >= valid_dim0_start and dst_index_0 < valid_dim0_end)
    E ^
    E IncompatibleTypeErrorImpl('invalid operands of type pointer and triton.language.int32')

方便提供下 python triton版本么
image

我这里py311 triton2.3.1运行正常

@Dayrker
Copy link
Author

Dayrker commented Nov 3, 2024

Describe the bug

位置: FlagGems/tests/test_special_ops.py::test_pad FlagGems/src/flag_gems/ops/pad.py 现象:

  1. res_out = flag_gems.pad(ref_x, pad_params, pad_mode, pad_value)使用会报错
    E cond = (dst_index_0 >= valid_dim0_start and dst_index_0 < valid_dim0_end)
    E ^
    E IncompatibleTypeErrorImpl('invalid operands of type pointer and triton.language.int32')

方便提供下 python triton版本么 image

我这里py311 triton2.3.1运行正常

image
在这里替换使用flag_gems.pad并pytest才会报错。
python: 3.10.14
triton: 2.3.1

@MARD1NO
Copy link
Collaborator

MARD1NO commented Nov 4, 2024

Describe the bug

位置: FlagGems/tests/test_special_ops.py::test_pad FlagGems/src/flag_gems/ops/pad.py 现象:

  1. res_out = flag_gems.pad(ref_x, pad_params, pad_mode, pad_value)使用会报错
    E cond = (dst_index_0 >= valid_dim0_start and dst_index_0 < valid_dim0_end)
    E ^
    E IncompatibleTypeErrorImpl('invalid operands of type pointer and triton.language.int32')

方便提供下 python triton版本么 image
我这里py311 triton2.3.1运行正常

image 在这里替换使用flag_gems.pad并pytest才会报错。 python: 3.10.14 triton: 2.3.1

这里不能等价调用,最终我们实现替换的aten的pad,而一些参数预处理是会在 functional python层面处理,最后再送到 pad算子里

@Dayrker
Copy link
Author

Dayrker commented Nov 6, 2024

Describe the bug

位置: FlagGems/tests/test_special_ops.py::test_pad FlagGems/src/flag_gems/ops/pad.py 现象:

  1. res_out = flag_gems.pad(ref_x, pad_params, pad_mode, pad_value)使用会报错
    E cond = (dst_index_0 >= valid_dim0_start and dst_index_0 < valid_dim0_end)
    E ^
    E IncompatibleTypeErrorImpl('invalid operands of type pointer and triton.language.int32')

方便提供下 python triton版本么 image
我这里py311 triton2.3.1运行正常

image 在这里替换使用flag_gems.pad并pytest才会报错。 python: 3.10.14 triton: 2.3.1

这里不能等价调用,最终我们实现替换的aten的pad,而一些参数预处理是会在 functional python层面处理,最后再送到 pad算子里

了解,多谢~
再请教一下,对这个case如果想使用这种形式的话,可以对输入or参数做什么样的处理使他能够跑起来呢。因为框架原因,这边没办法使用aten替换的形式来使用flaggems

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants