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

Fix some type conversion warnings on MSVC. #4009

Merged
merged 1 commit into from
Feb 8, 2025

Conversation

ScottTodd
Copy link
Member

[build] D:\dev\projects\iree\third_party\torch-mlir\lib\Conversion\TorchToTosa\TorchToTosa.cpp(3498): warning C4305: 'argument': truncation from 'double' to 'const T'
[build]         with
[build]         [
[build]             T=float
[build]         ]
[build] D:\dev\projects\iree\third_party\torch-mlir\lib\Conversion\TorchToTosa\TorchToTosa.cpp(3504): warning C4305: 'argument': truncation from 'double' to 'const T'
[build]         with
[build]         [
[build]             T=float
[build]         ]

(Not sure why the half/one/three lines were warning free, might as well fix them too.

```
[build] D:\dev\projects\iree\third_party\torch-mlir\lib\Conversion\TorchToTosa\TorchToTosa.cpp(3498): warning C4305: 'argument': truncation from 'double' to 'const T'
[build]         with
[build]         [
[build]             T=float
[build]         ]
[build] D:\dev\projects\iree\third_party\torch-mlir\lib\Conversion\TorchToTosa\TorchToTosa.cpp(3504): warning C4305: 'argument': truncation from 'double' to 'const T'
[build]         with
[build]         [
[build]             T=float
[build]         ]
```

(Not sure why the half/one/three lines were warning free, might as well fix them too.
@ScottTodd ScottTodd requested review from sahas3 and sjarus February 7, 2025 22:13
Copy link
Contributor

@sahas3 sahas3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ScottTodd ScottTodd merged commit d4ee6ba into llvm:main Feb 8, 2025
3 checks passed
@ScottTodd ScottTodd deleted the msvc-warnings-fix branch February 8, 2025 00:00
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.

2 participants