Gemm + bias + c_permute (#312)

* init commit

* add desc

* finished c permute

* fixed vector lens
This commit is contained in:
zjing14
2022-06-30 19:55:09 -05:00
committed by GitHub
parent ab6c82c984
commit fa9a0a5cfb
6 changed files with 1113 additions and 2 deletions

View File

@@ -11,8 +11,8 @@ namespace element_wise {
struct Add
{
template <typename T>
__host__ __device__ constexpr void operator()(T& y, const T& x0, const T& x1) const;
template <typename Y, typename X0, typename X1>
__host__ __device__ constexpr void operator()(Y& y, const X0& x0, const X1& x1) const;
template <>
__host__ __device__ constexpr void
@@ -28,6 +28,13 @@ struct Add
y = x0 + x1;
};
template <>
__host__ __device__ constexpr void
operator()<half_t>(half_t& y, const float& x0, const half_t& x1) const
{
y = type_convert<half_t>(x0) + x1;
};
// Question: should half_t be supported ?
template <>
__host__ __device__ constexpr void