wipe out existing CI#2
Conversation
|
I'm not sure to understand why you need to start again from scratch. That would kind of obfuscate your changes compared to the original repo and make it harder to track changes. If you did something completely different without any intersection then go ahead, but I don't like much the idea to have no workflow anymore while they are seemingly doing something better than nothing? |
|
Yeah, that's fair. Alright, so, I have the following things that I could bring in:
The linux and windows runners are fairly straight forward, as is the linters. The mac os x runner is a lootttttt of changes. Thoughts on what you would like me to bring into this? Maybe linux runner + linters? linux runner + windows runner + linters? |
|
Well... why dont we go the other way around? I'll add in the linters, and each runner (separate prs), and then once I've added what we want, we can remove what we dont want? |
|
I like this idea :) |
Introduce the helper machinery that the per-class to_torch / to_numpy methods will migrate to in subsequent commits. Existing public symbols (can_zerocopy, dlpack_to_torch, invalidate_zerocopy_cache, current_arch_is_cpu) are preserved as deprecated shims so the in-tree pre-rework callers continue to work; they will be removed once every call site is migrated. New surface: - _ZerocopyCache: per-instance container with two independent slots (torch tensor + numpy ndarray), each filled lazily on first access via torch.utils.dlpack.from_dlpack and numpy.from_dlpack respectively. Numpy zero-copy now bypasses torch entirely (closes review #6). - make_zerocopy_cache_if_supported(owner, ...): constructs a cache when zero-copy is supported and registers `owner` with `pyquadrants.cache_holders` so invalidation is wired automatically (closes review #18). - get_zerocopy_torch / get_zerocopy_numpy: thin entry points that implement the always-zerocopy-then-clone semantic (closes review #15, #16, #21) and the Apple Metal double-sync (qd.sync() on read AND torch.mps.synchronize() after .clone()/.to(); closes review #1, #22, #23). Also applies the small lints from the review: - Module-level constant for the torch>2.9.1 MPS bytes_offset probe; drops the pointless lru_cache wrapper around a zero-arg helper (closes review #2). - ASCII '...' instead of Unicode horizontal ellipsis '\u2026' in the docstring (closes review #3). - Top-level imports for numpy and torch (try/except for the no-torch CI case); no per-call lazy imports in the new code path (closes review #7, #9). The deprecated shim still does what the existing per-class methods expect; the new helpers are torch-clean. cache_holders is still empty until the next commits register Ndarray / ScalarField / MatrixField; this commit alone is no-op behaviourally.
Issue: #
Brief Summary
Make a clean sheet, to start from fresh.
You can see where I'm going here:
(a bnch of tests fail, but the build and install works)
copilot:summary
Walkthrough
copilot:walkthrough