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
Inherit input ndarray device in chainerx.ascontiguousarray #8262
Conversation
When is device=None. closes chainer#8259
How about adding device checks to existing tests, instead of creating a new test? |
I want to parametrize cuda too but there is no grantee of two GPUs on the system so specialized it. |
|
Seems |
Do you mean the default device? |
tests/chainerx_tests/unit_tests/routines_tests/test_creation.py
Outdated
Show resolved
Hide resolved
tests/chainerx_tests/unit_tests/routines_tests/test_creation.py
Outdated
Show resolved
Hide resolved
Co-Authored-By: niboshi <niboshi000@gmail.com>
tests/chainerx_tests/unit_tests/routines_tests/test_creation.py
Outdated
Show resolved
Hide resolved
Co-Authored-By: niboshi <niboshi000@gmail.com>
As discussed for #8273 I've removed the comment |
Aren't we removing |
@take-cheeze |
As it's safer to start with a minimal specification, let's remove |
Note that the argument |
@@ -383,12 +348,23 @@ def test_ascontiguousarray_from_chainerx_array(device, shape, dtype, padding): | |||
a = chainerx.ascontiguousarray(obj) | |||
if not padding and shape != (): # () will be reshaped to (1,) | |||
assert a is obj | |||
e = chainerx.ascontiguousarray(np_arr) | |||
e = chainerx.asarray(np_arr) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
np_arr
should just work in chainerx.testing.assert_array_equal_ex
. How about simply removing this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the variable name so removed the function calling instead!
Jenkins, test this please |
Jenkins CI test (for commit 3d1d5ef, target branch master) succeeded! |
When is device=None.
closes #8259