cornell-zhang / heterocl

HeteroCL: A Multi-Paradigm Programming Infrastructure for Software-Defined Heterogeneous Computing
https://cornell-zhang.github.io/heterocl/
Apache License 2.0
326 stars 92 forks source link

Add bias_add operator #119

Closed faku99 closed 1 year ago

faku99 commented 5 years ago

I can't find a way to implement bias_add operator.

Let's say I have a Tensor with a shape of (1, 8, 28, 28) and another Tensor (which contains biases) with a shape (8, 1, 1). How could I add the biases to the first Tensor?

TVM implements such an operator with C++ but I can't find a way to implement it with the hcl.compute API. Any thoughts?

seanlatias commented 5 years ago

The easiest way to do that is using our imperative DSL.

chhzh123 commented 1 year ago

As we have released a new version of HeteroCL that entirely moves the compilation stack to MLIR, issues related to the original HalideIR flow will be closed. Please check out the latest HeteroCL and see if the issue still exists.