Open
Conversation
os.sched_getaffinity does not exist on macOS and a similar workaround is already used in src/fairseq2/recipes/utils/log.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do? Please describe:
The library does not build from source on macOS (tested with Sequoia 15.0) with conda due to an incompatible compiler availability check (1), an outdated libpng submodule version (2) and an unavailable
os.sched_getaffinity()(3)Error message from (1), even after running
conda forge -c conda-forge compilers:Resolved this issue by adding a conditional check in
CMakeLists.txt(5fe3c62) when installing with conda and apple to check for clang path directly while keeping the original (non-apple compiler check) in place. Also updated the help message to remove the pin on compilers=1.2.0 as it is too old to compile without issues.Error message from (2), which is a known issue from libpng since early 2024:
Resolved this issue by updating the submodule libpng from 1.6.34 (pnggroup/libpng@b78804f) to 1.6.48 (pnggroup/libpng@ea12796).
Error message from (3), which is already mitigated in src/fairseq2/utils/threading.py in a similar fashion. This happens during execution, not during the compilation step.
Resolved in 10c656f by catching the AttributeError and utilizing
os.cpu_countas a fallback.Does your PR introduce any breaking changes? If yes, please list them:
None. Ran tests locally (M3 Max, Sequoia 15.0) and (Ubuntu 22.04.5 LTS, NVIDIA A100-SXM4-80GB, 535.183.01, CUDA 12.1) without issues.
Check list: