Skip to content

[mini] [bugfix] Remove Default Argument in abcd.py#483

Open
rob-shalloo wants to merge 1 commit into
LASY-org:developmentfrom
rob-shalloo:cupyfix
Open

[mini] [bugfix] Remove Default Argument in abcd.py#483
rob-shalloo wants to merge 1 commit into
LASY-org:developmentfrom
rob-shalloo:cupyfix

Conversation

@rob-shalloo

Copy link
Copy Markdown
Member

The default argument in abcd.py is causing issues when trying to use a numpy backend on a machine which is capable of cupy.

The default argument is evaluated at class definition time — i.e., at import. So even though you might be trying to run with a NumPy backend, the xp variable is already bound to CuPy when the module is parsed, and CuPy immediately tries to allocate a GPU array. In my case I did have cupy, but an old driver (hence wanting to use numpy backend).

@MaxThevenet

Copy link
Copy Markdown
Contributor

Thanks, we'll need to fix CI before merging.

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