Change default cast_policy to numpy+floatX to fix float downcasting
Description
This PR changes the default cast_policy in configdefaults.py to numpy+floatX. This removes the older NumpyAutocaster machinery which was causing inconsistent float downcasting (e.g., downcasting 9.0 to float32 while keeping 8.9 and 9.1 as float64).
Opening this as a draft PR first to let the CI test suite evaluate the overall impact. Changing this core default will likely require updating type assertions across the broader test suite where the old downcasting behavior was explicitly expected.
Related Issue
- [x] Closes #1073
- [ ] Related to #
Checklist
- [ ] Checked that the pre-commit linting/style checks pass
- [x] Included tests that prove the fix is effective or that the new feature works
- [ ] Added necessary documentation (docstrings and/or example notebooks)
- [x] If you are a pro: each commit corresponds to a relevant logical change
Type of change
- [ ] New feature / enhancement
- [x] Bug fix
- [ ] Documentation
- [ ] Maintenance
- [ ] Other (please specify):
i have changed the default to see what the damage cuz i think all tests would also be relying on the old NumpyAutocaster here, lets see what the blast radius is
so here i have changed the defaults and now many tests are failling, so should i correct these tests as for example i did in test_elemwise.py and should do the same in others, i would do that in an upcoming commit, cuz it does fixes the issue but old tests fails
@ricardoV94 i am sorry for pinging but this one would be a bit tricky and would take some time. Switching the default to numpy+floatX has a significant damage across the test suite. Tests mixing float32 variables with Python int literals (now correctly upcasting to float64)., Hardcoded dtypes/shapes in equal_computations checks, Internal rewrite rules with hardcoded constants causing TypeError during node replacement.
I wanted to confirm this is the desired direction before I put in the effort to clear the remaining 30 failing modules.