-
Notifications
You must be signed in to change notification settings - Fork 0
Test that TORCH_FEATURE_VERSION guards are used where needed #5
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
base: base_20251120_6741
Are you sure you want to change the base?
Conversation
[ghstack-poisoned]
[ghstack-poisoned]
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||||||
User description
Splits each torch library registration in the 2.10 folder into its own file -- I had a script that parsed kernel.cpp to do this but I felt like forcing this responsibility on the user might be less error prone
Compiles each file targetting 2.9 and asserts that compilation fails. (There are 2 2.9 kernels we use as negative tests where compilation is expected to succeed)
Stack from ghstack (oldest at bottom):
PR Type
Tests, Enhancement
Description
Refactored monolithic
kernel.cppinto individual function filesCreated comprehensive test suite validating PyTorch 2.10+ version guards
Added negative tests to verify backward compatibility with 2.9.0
Implemented dynamic test generation for all C++ and CUDA source files
Diagram Walkthrough
File Walkthrough
3 files
New test suite for version compatibility validationAdded negative test file for 2.9 compatibilityAdded negative test CUDA file for 2.9 compatibility16 files
Deleted monolithic kernel fileExtracted foreach_mul function into separate fileExtracted foreach_mul_ function into separate fileExtracted make_tensor_clones_and_call_foreach functionExtracted my_empty function into separate fileExtracted my_reshape function into separate fileExtracted my_view function into separate fileExtracted test_tensor_device function into separate fileExtracted test_device_constructor function into separate fileExtracted test_device_equality function into separate fileExtracted test_device_set_index function into separate fileExtracted test_device_index function into separate fileExtracted test_device_is_cuda function into separate fileExtracted test_device_is_cpu function into separate fileExtracted test_get_num_threads function into separate fileExtracted test_parallel_for function into separate file1 files
Added shared tensor accessor kernel header