Skip to content

wipe out existing CI#2

Closed
hughperkins wants to merge 2 commits intomainfrom
hp/wipe-out-existing-ci
Closed

wipe out existing CI#2
hughperkins wants to merge 2 commits intomainfrom
hp/wipe-out-existing-ci

Conversation

@hughperkins
Copy link
Copy Markdown
Collaborator

Issue: #

Brief Summary

Make a clean sheet, to start from fresh.

You can see where I'm going here:

copilot:summary

Walkthrough

copilot:walkthrough

@duburcqa
Copy link
Copy Markdown
Contributor

duburcqa commented Jun 2, 2025

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?

@hughperkins
Copy link
Copy Markdown
Collaborator Author

Yeah, that's fair. Alright, so, I have the following things that I could bring in:

  • linters
  • linux x86 runner
  • windows runner
  • mac os x runner

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?

@hughperkins
Copy link
Copy Markdown
Collaborator Author

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?

@hughperkins hughperkins closed this Jun 2, 2025
@duburcqa
Copy link
Copy Markdown
Contributor

duburcqa commented Jun 2, 2025

I like this idea :)

@hughperkins hughperkins deleted the hp/wipe-out-existing-ci branch June 15, 2025 14:29
hughperkins added a commit that referenced this pull request Apr 26, 2026
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.
@claude claude Bot mentioned this pull request Apr 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants