Skip to content

Conversation

@jikechao
Copy link
Member

Fix #17952.

Since TVM's LLVM backend does not support sqrt for integer types (e.g., int16), we explicitly cast the input to float32 at the TOPI operator level before computing sqrt. This ensures compatibility with hardware-accelerated floating-point sqrt instructions.

cc @Hzfengsy @tqchen

@github-actions github-actions bot requested review from Hzfengsy and tqchen May 12, 2025 08:02
@tqchen tqchen merged commit b77f948 into apache:main May 13, 2025
10 checks passed
ShiboXing pushed a commit to ShiboXing/tvm that referenced this pull request Aug 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Cannot find intrinsic declaration, possible type mismatch: llvm.sqrt

2 participants