Adds skills and various code improvements#832
Merged
pranavm-nvidia merged 11 commits intomainfrom Mar 24, 2026
Merged
Conversation
- Store os.open() result and close it after os.dup2() - Close NamedTemporaryFile in finally block - Move tempfile creation before try so cleanup always runs
Use utils.default() instead of mutable list default parameter.
- Remove loop that built stack_modules/stack_classes only to be overwritten - Remove unused stack_classes variable - Simplify recursion guard to only check stack_modules
Replace hardcoded if/if blocks with a _DTYPE_SUGGESTIONS dict lookup.
- trace/ops/base.py: infer_dtypes() now uses raise_error() instead of assert - frontend/tensor.py: Tensor.__init__ data!=None check uses raise_error() These checks are no longer stripped by python -O.
Use super().__getattribute__ for guard checks to avoid recursion. Errors are no longer stripped by python -O.
Ensures KeyboardInterrupt and SystemExit still propagate. Fixed in utils/ast.py, utils/utils.py, and common/exception.py.
- compiler.py: Wrap _get_compiler_objects() with threading.Lock - base.py: Replace manual _COUNT with itertools.count() (atomic in CPython) - Add concurrent test for compiler client initialization
Use threading.Lock to ensure the wrapped function runs exactly once even under concurrent access. Added tests for both serial and concurrent invocation.
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.
No description provided.