aiter: Build errors with PREBUILD_KERNELS

When trying to build using PREBUILD_KERNELS=1 I’m getting quite a few build errors:

/app/aiter/aiter/jit/build/aiter_/build/srcs/rocm_ops.cu:265:32: error: use of undeclared identifier 'mha_varlen_fwd'
  265 |       m.def("mha_varlen_fwd", &mha_varlen_fwd,
      |                                ^
/app/aiter/aiter/jit/build/aiter_/build/srcs/rocm_ops.cu:283:25: error: use of undeclared identifier 'mha_bwd'; did you mean 'mha_fwd'?
  283 |       m.def("mha_bwd", &mha_bwd,
      |                         ^~~~~~~
      |                         mha_fwd
/app/aiter/aiter/jit/build/aiter_/build/include/mha_fwd.h:7:1: note: 'mha_fwd' declared here
    7 | mha_fwd(at::Tensor &q,       // [b, sq, hq, d]
      | ^
/app/aiter/aiter/jit/build/aiter_/build/srcs/rocm_ops.cu:300:32: error: use of undeclared identifier 'mha_varlen_bwd'
  300 |       m.def("mha_varlen_bwd", &mha_varlen_bwd,
      |                                ^
In file included from /app/aiter/aiter/jit/build/aiter_/build/srcs/rocm_ops.cu:3:
In file included from /app/aiter/aiter/jit/build/aiter_/build/include/activation.h:4:
In file included from /usr/local/lib/python3.12/dist-packages/torch/include/torch/extension.h:9:
In file included from /usr/local/lib/python3.12/dist-packages/torch/include/torch/csrc/api/include/torch/python.h:11:
In file included from /usr/local/lib/python3.12/dist-packages/torch/include/torch/csrc/Exceptions.h:12:
/usr/local/lib/python3.12/dist-packages/torch/include/pybind11/pybind11.h:244:13: error: static assertion failed due to requirement 'expected_num_args<pybind11::name, pybind11::scope, pybind11::sibling, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v>(sizeof...(Args), argument_loader<at::Tensor &, const at::Tensor &, const at::Tensor &, float, float, bool, int, int, bool, bool, std::optional<at::Tensor>, std::optional<const at::Tensor>, std::optional<at::Generator>>::args_pos >= 0, argument_loader<at::Tensor &, const at::Tensor &, const at::Tensor &, float, float, bool, int, int, bool, bool, std::optional<at::Tensor>, std::optional<const at::Tensor>, std::optional<at::Generator>>::has_kwargs)': The number of argument annotations does not match the number of function arguments

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22 (16 by maintainers)

Most upvoted comments

we will try to change permission when bdist_wheel.