openxla / stablehlo

Backward compatible ML compute opset inspired by HLO/MHLO
Apache License 2.0
357 stars 100 forks source link

Update TypeInference.cpp #2328

Closed xiuhu17 closed 1 month ago

xiuhu17 commented 1 month ago

add static cast to int64_t type

Context: I was trying to setup the environment of XLA, and find there was a syntax error which caused by the non consistent type of parameters in std::max() function.

There was an error on Macos Sonoma 14.3 , using LLVM 17.0.6.

xiuhu17 commented 1 month ago

Thank you for your contribution! Would you mind adding some context to the description on what prompted this change? Also, while we're changing this code, would you mind changing long to int64_t?

Context: I was trying to setup the environment of XLA, and find there was a syntax error which caused by the non consistent type of parameters in std::max() function.

Yes, I would change it to int64_t

mlevesquedion commented 1 month ago

Thank you for your contribution! Would you mind adding some context to the description on what prompted this change? Also, while we're changing this code, would you mind changing long to int64_t?

Context: I was trying to setup the environment of XLA, and find there was a syntax error which caused by the non consistent type of parameters in std::max() function.

Yes, I would change it to int64_t

SG, thank you! Was this on Windows or some other OS and/or with a different compiler? I don't see a syntax error on Linux with clang.

xiuhu17 commented 1 month ago

Thank you for your contribution! Would you mind adding some context to the description on what prompted this change? Also, while we're changing this code, would you mind changing long to int64_t?

Context: I was trying to setup the environment of XLA, and find there was a syntax error which caused by the non consistent type of parameters in std::max() function. Yes, I would change it to int64_t

SG, thank you! Was this on Windows or some other OS and/or with a different compiler? I don't see a syntax error on Linux with clang.

There was an error on Macos Sonoma 14.3 , using LLVM 17.0.6.