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

[Hexagon] Float and quantized dense operators with schedules #12873

Merged
merged 19 commits into from
Jan 24, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change var name to conform
joshherr-quic authored and Krzysztof Parzyszek committed Jan 23, 2023
commit 3c1613af990be0575550600b9e3b85b01c6ed4a6
16 changes: 8 additions & 8 deletions python/tvm/topi/hexagon/qnn/qdense.py
Original file line number Diff line number Diff line change
@@ -25,10 +25,10 @@
def qdense_compute(
tensor_a,
tensor_b,
zero_A,
scale_A,
zero_B,
scale_B,
zero_a,
scale_a,
zero_b,
scale_b,
zero_out=None,
scale_out=None,
bias=None,
@@ -70,10 +70,10 @@ def qdense_compute(

k = te.reduce_axis((0, in_dim), name="k")
compute_lambda = lambda n, m: te.sum(
scale_A
* (tensor_a[n, k].astype("float32") - zero_A)
* scale_B
* (tensor_b[m, k].astype("float32") - zero_B),
scale_a
* (tensor_a[n, k].astype("float32") - zero_a)
* scale_b
* (tensor_b[m, k].astype("float32") - zero_b),
axis=k,
)
compute_name = "qmatmul_sliced"