Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Cupy space #1401

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open

Add Cupy space #1401

wants to merge 38 commits into from

Conversation

adler-j
Copy link
Member

@adler-j adler-j commented Jun 28, 2018

This should replace #1231. I'm currently in the middle of a nightmarish merge of master changes and changes in this branch.

Edit: Overall my reaction to this PR atm is: Oh god please kill me. But I'll try to persevere.

Holger Kohr added 30 commits June 28, 2018 12:42
- expose trivial `none_context`
- add `xfail_if` utility for conditional xfail
- replace `almost_equal` by `pytest.approx` everywhere
- extend more lp_discr tests to other impls
- expose `array_module`, `array_cls` and `as_numpy` tools
  for handling arrays with different impls
- use native impl in diff_ops
- remove CupyTensor.ufuncs, use base class method
- add skip_if_no_cupy decorator
@pep8speaks
Copy link

Checking new PR...

Line 1869:21: E123 closing bracket does not match indentation of opening bracket's line

  • Complete extra results for this file :
                ):                    ^---

Line 30:1: E302 expected 2 blank lines, found 1

  • Complete extra results for this file :

def _ndigits(a, b, default=None):^---

Line 52:5: E123 closing bracket does not match indentation of opening bracket's line

  • Complete extra results for this file :
)    ^---

@kohr-h
Copy link
Member

kohr-h commented Jun 28, 2018

Is it mostly the tests or other stuff as well?

@kohr-h
Copy link
Member

kohr-h commented Jun 28, 2018

Just a minor remark: We should require CuPy >= 4.0 since it's the only version available through conda (I heard they also work on Windows support for 5.0), and since it supports a lot of useful stuff that earlier versions don't, most of all FFTs.

@adler-j
Copy link
Member Author

adler-j commented Jun 28, 2018

Basically someone (you and me) has done the same work exactly twice, one on master and one here. So there are merge conflicts everywhere. Join that with this branch actually containing some fundamental changes and you have a nightmare merge. I predict it will take at least a few days before it's all running smoothingly.

W.r.t windows its already up, I'm using it atm.

@kohr-h
Copy link
Member

kohr-h commented Jun 28, 2018

Basically someone (you and me) has done the same work exactly twice, one on master and one here. So there are merge conflicts everywhere. Join that with this branch actually containing some fundamental changes and you have a nightmare merge. I predict it will take at least a few days before it's all running smoothingly.

😬 😇

W.r.t windows its already up, I'm using it atm.

Cool, I guess through pip?

@adler-j
Copy link
Member Author

adler-j commented Jun 28, 2018

Question for @kohr-h. At what point (if at all) did np.absolute(complex_vector) start returning something in complex_vector.space.real_space?

@kohr-h
Copy link
Member

kohr-h commented Jun 28, 2018

This can only be the effect of __array_ufunc__.

@adler-j
Copy link
Member Author

adler-j commented Jun 28, 2018

Is there a list of the ufuncs that do this somewhere?

@kohr-h
Copy link
Member

kohr-h commented Jun 28, 2018

>>> ufuncs = list(
...     filter(
...         lambda a: isinstance(getattr(np, a), np.ufunc), 
...         dir(np)
...     )
... )
>>> c2r = list(
...     filter(
...         lambda f: any(t in getattr(np, f).types 
...                       for t in('F->f', 'D->d', 'G->g')),
...         ufuncs,
...     )
... )
>>> c2r
['abs', 'absolute']

@adler-j
Copy link
Member Author

adler-j commented Jun 28, 2018

Thanks!

@kohr-h kohr-h added this to Work in progress in PR Status Aug 31, 2018
@kohr-h kohr-h added this to In Progress in Release 1.0.0 Sep 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
PR Status
Work in progress
Release 1.0.0
  
In Progress
Development

Successfully merging this pull request may close these issues.

None yet

3 participants