arrow: fix turning simd off#27906
Conversation
It's impossible to set an option to `None` as it's interpreted as a string. This change adds a `"none"` option to `simd_level` and `runtime_simd_level` while keeping the old `None` value for backward compatibility. fixes conan-io#27886
There was a problem hiding this comment.
Hi @dvirtz
Thanks for this PR 👏
I think that we can simplify it more:
Nonenever worked as an option, so let's remove it.- Both options are never removed from the recipe, so there is no need to use get_safe and convert them into a string, right?
| "simd_level": [None, "default", "sse4_2", "avx2", "avx512", "neon", "none"], | ||
| "runtime_simd_level": [None, "sse4_2", "avx2", "avx512", "max", "none"], |
There was a problem hiding this comment.
I think that if this is not working, we can remove it. Wdyt? cc @AbrilRBS
| "simd_level": [None, "default", "sse4_2", "avx2", "avx512", "neon", "none"], | |
| "runtime_simd_level": [None, "sse4_2", "avx2", "avx512", "max", "none"], | |
| "simd_level": ["default", "sse4_2", "avx2", "avx512", "neon", "none"], | |
| "runtime_simd_level": ["sse4_2", "avx2", "avx512", "max", "none"], |
| if str(self.options.get_safe("simd_level")).lower() != "none" or \ | ||
| str(self.options.get_safe("runtime_simd_level")).lower() != "none": |
There was a problem hiding this comment.
| if str(self.options.get_safe("simd_level")).lower() != "none" or \ | |
| str(self.options.get_safe("runtime_simd_level")).lower() != "none": | |
| if self.options.simd_level != "none" or \ | |
| self.options.runtime_simd_level != "none": |
| if str(self.options.get_safe("simd_level")).lower() != "none" or \ | ||
| str(self.options.get_safe("runtime_simd_level")).lower() != "none": |
There was a problem hiding this comment.
| if str(self.options.get_safe("simd_level")).lower() != "none" or \ | |
| str(self.options.get_safe("runtime_simd_level")).lower() != "none": | |
| if self.options.simd_level != "none" or \ | |
| self.options.runtime_simd_level != "none": |
|
Hi @dvirtz thanks a lot for taking the time to report this and submitting a PR, we appreciate it. After trying this locally, I'm getting compilation errors after disabling the simd levels in Windows/msvc/arm64, Note that disabling parquet works, have you tried this locally? Do you see the same error? This does bring up the point that https://arrow.apache.org/docs/developers/cpp/windows.html#building-on-windows-arm64-using-ninja-and-clang says that msvc/arm64 is not a supported configuration in upsteam, and to instead use some flavour of clang, which would be compatible for the msvc binaries in the rest of your graph, we cn help with setting it up if needed :) |
|
Thanks for the review @franramirez688 and @AbrilRBS. |
|
With clang it hits #26390 |
|
Thanks @dvirtz - this is now handled in #28675 and superseded by that PR. Indeed, the To avoid the eternal confusion regarding the word "none", we've just used "disabled" in #28675, thanks! |
Summary
Changes to recipe: arrow/*
Motivation
It's impossible to set an option to
Noneas it's interpreted as a string.fixes #27886
Details
This change adds a
"none"option tosimd_levelandruntime_simd_levelwhile keeping the oldNonevalue for backward compatibility.