[Bug] [Hexagon] HVX conv2d kernel incorrectly relies on VTCM being zeroed #13144
Labels
needs-triage
PRs or issues that need to be investigated by maintainers to find the right assignees to address it
type: bug
The HVX conv2d kernel introduced in #12204 only works in simulation, even with #13002 applied.
Zeroing out allocated VTCM memory in
VTCMAllocation::VTCMAllocation()
(amemset
inserted at line 79 inhexagon_buffer.cc
makes the kernel run correctly on real hardware. Conversely, filling a VTCM allocation with junk values (e.g., filling it with0xCC
) causes the kernel to fail in simulation as well.It seems like something isn't being zeroed properly, or some VTCM is being accessed that shouldn't be. Unfortunately, I haven't been able to nail down where this happens yet.
Expected behavior
Executing the
tests/python/contrib/test_hexagon/topi/test_conv2d_fp16_intrin.py
tests should work on real hardware.Actual behavior
Tests fail with result mismatches.
Environment
Ubuntu 20.04 with clang++ 14, TVM with PR #13002 applied, Hexagon SDK 5.1.0.0 with Hexagon Tools 8.5.13, using a development version of LLVM 16.
Steps to reproduce
ANDROID_SERIAL_NUMBER
to a valid Hexagon device serial numberpytest tests/python/contrib/test_hexagon/topi/test_conv2d_fp16_intrin.py
Triage
cc: @kparzysz-quic @quic-sanirudh
cc @mehrdadh
The text was updated successfully, but these errors were encountered: