Skip to content

refactor(core): Split array.py - separate GPUArray and memory management #146

Closed

Description

@m96-chan

Problem

src/pygpukit/core/array.py is 741 lines with GPUArray class and memory management mixed.

Current State

src/pygpukit/core/
└── array.py  (741 lines)

Proposed Structure

src/pygpukit/core/
├── array.py             (GPUArray class only, ~400 lines)
├── memory.py            (memory allocation, transfer)
├── dtype.py             (dtype handling, conversions)
└── factory.py           (array creation: zeros, empty, from_numpy)

Benefits

  • GPUArray class cleaner
  • Memory management isolated
  • Easier to swap memory backends
  • Better testability

Related

  • Core infrastructure refactoring

Activity

  1. m96-chan commented on Dec 30, 2025

    @m96-chan
    OwnerAuthor

    Completed in PR #168

  2. added a commit that references this issue on Dec 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions