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

Check cl_khr_fp16 support #225

Closed
wants to merge 9 commits into from
Closed

Check cl_khr_fp16 support #225

wants to merge 9 commits into from

Conversation

vorj
Copy link

@vorj vorj commented Apr 16, 2019

Task of #224 .
ClPy in this PR checks that the device supports #pragma OPENCL EXTENSION cl_khr_fp16: enable or not before first running kernel, and enable or disable cl_khr_fp16 adequately.

Additionally, we also have the problem that test_helper.py blames DeprecationWarning with pytest>=5 . I also fixed this issue.

Remaining tasks:

  • skip tests which have half output when the device doesn't support cl_khr_fp16

@vorj vorj assigned ghost Apr 16, 2019
Copy link

@jenkins-maekawa jenkins-maekawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test (commit 8f24069) failed in vega.

@vorj
Copy link
Author

vorj commented Apr 16, 2019

@nsakabe-fixstars Please check this branch. Does ClPy of this branch work on your environment?

Copy link

@jenkins-maekawa jenkins-maekawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test (commit 8f24069) failed in titanv.

@vorj vorj force-pushed the 224-check-cl_khr_fp16-support branch from b8cada7 to 8e5154b Compare April 16, 2019 07:40
Copy link

@jenkins-maekawa jenkins-maekawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test (commit acc786b) failed in vega.

Copy link

@jenkins-maekawa jenkins-maekawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test (commit acc786b) failed in titanv.

@vorj vorj force-pushed the 224-check-cl_khr_fp16-support branch from 8e5154b to bbc8af3 Compare April 16, 2019 08:04
Copy link

@jenkins-maekawa jenkins-maekawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test (commit 7b0637e) failed in vega.

@vorj vorj force-pushed the 224-check-cl_khr_fp16-support branch from bbc8af3 to ddb430d Compare April 16, 2019 08:12
Copy link

@jenkins-maekawa jenkins-maekawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test (commit 3c0be6a) failed in vega.

Copy link

@jenkins-maekawa jenkins-maekawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test (commit 7b0637e) passed in titanv.

Copy link

@jenkins-maekawa jenkins-maekawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test (commit 7b0637e) passed in titanv.

@ghost
Copy link

ghost commented Apr 16, 2019

@vorj I confirmed it working on NVIDIA GPU w/o fp16 feature. Thank you.

@ghost ghost assigned vorj and unassigned ghost Apr 16, 2019
@vorj vorj force-pushed the 224-check-cl_khr_fp16-support branch from ddb430d to 85fc8bb Compare April 18, 2019 08:15
Copy link

@jenkins-maekawa jenkins-maekawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test (commit 695f653) passed in vega.

Copy link

@jenkins-maekawa jenkins-maekawa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test (commit 3c0be6a) passed in titanv.

@vorj vorj assigned ghost and unassigned vorj Apr 19, 2019
@vorj
Copy link
Author

vorj commented Apr 19, 2019

@nsakabe-fixstars It's time to pass the baton. This PR has a remaining task, so please push this forward. You have!

@ghost
Copy link

ghost commented May 23, 2019

skip tests which have half output

I ran the tests with 1080Ti(w/o fp16). Needed to skip:

Need to skip cases:
test_fusion.py::TestFusionTrigonometric::test_arctan FAILED              [ 15%]
test_fusion.py::TestFusionTrigonometric::test_arctan2 FAILED             [ 16%]
test_fusion.py::TestFusionTrigonometric::test_cos FAILED                 [ 16%]
test_fusion.py::TestFusionTrigonometric::test_deg2rad FAILED             [ 16%]
test_fusion.py::TestFusionTrigonometric::test_hypot FAILED               [ 16%]
test_fusion.py::TestFusionTrigonometric::test_rad2deg FAILED             [ 16%]
test_fusion.py::TestFusionTrigonometric::test_sin FAILED                 [ 16%]
test_fusion.py::TestFusionTrigonometric::test_tan FAILED                 [ 16%]
test_fusion.py::TestFusionHyperbolic::test_arcsinh FAILED                [ 16%]
test_fusion.py::TestFusionHyperbolic::test_cosh FAILED                   [ 17%]
test_fusion.py::TestFusionHyperbolic::test_sinh FAILED                   [ 17%]
test_fusion.py::TestFusionHyperbolic::test_tanh FAILED                   [ 17%]
test_fusion.py::TestFusionRounding::test_ceil FAILED                     [ 17%]
test_fusion.py::TestFusionRounding::test_fix FAILED                      [ 17%]
test_fusion.py::TestFusionRounding::test_floor FAILED                    [ 17%]
test_fusion.py::TestFusionRounding::test_rint FAILED                     [ 17%]
test_fusion.py::TestFusionRounding::test_rint_negative FAILED            [ 17%]
test_fusion.py::TestFusionRounding::test_trunc FAILED                    [ 17%]
test_fusion.py::TestFusionExplog::test_exp FAILED                        [ 17%]
test_fusion.py::TestFusionExplog::test_exp2 FAILED                       [ 18%]
test_fusion.py::TestFusionExplog::test_expm1 FAILED                      [ 18%]
test_fusion.py::TestFusionExplog::test_log FAILED                        [ 18%]
test_fusion.py::TestFusionExplog::test_log10 FAILED                      [ 18%]
test_fusion.py::TestFusionExplog::test_log1p FAILED                      [ 18%]
test_fusion.py::TestFusionExplog::test_log2 FAILED                       [ 18%]
test_fusion.py::TestFusionExplog::test_logaddexp FAILED                  [ 18%]
test_fusion.py::TestFusionExplog::test_logaddexp2 FAILED                 [ 18%]
test_fusion.py::TestFusionFloating::test_copysign FAILED                 [ 18%]
test_fusion.py::TestFusionFloating::test_nextafter FAILED                [ 19%]
test_fusion.py::TestFusionMisc::test_sqrt FAILED                         [ 23%]
test_ndarray_complex_ops.py::TestAngle::test_angle FAILED                [ 64%]
test_arithmetic.py::TestArithmetic::test_angle FAILED                    [  1%]
test_explog.py::TestExplog::test_exp FAILED                              [ 12%]
test_explog.py::TestExplog::test_exp2 FAILED                             [ 12%]
test_explog.py::TestExplog::test_expm1 FAILED                            [ 13%]
test_explog.py::TestExplog::test_log FAILED                              [ 13%]
test_explog.py::TestExplog::test_log10 FAILED                            [ 14%]
test_explog.py::TestExplog::test_log1p FAILED                            [ 14%]
test_explog.py::TestExplog::test_log2 FAILED                             [ 15%]
test_explog.py::TestExplog::test_logaddexp FAILED                        [ 15%]
test_explog.py::TestExplog::test_logaddexp2 FAILED                       [ 16%]
test_floating.py::TestFloating::test_copysign FAILED                     [ 16%]
test_floating.py::TestFloating::test_nextafter FAILED                    [ 18%]
test_hyperbolic.py::TestHyperbolic::test_arcsinh FAILED                  [ 20%]
test_hyperbolic.py::TestHyperbolic::test_cosh FAILED                     [ 21%]
test_hyperbolic.py::TestHyperbolic::test_sinh FAILED                     [ 21%]
test_hyperbolic.py::TestHyperbolic::test_tanh FAILED                     [ 22%]
test_misc.py::TestMisc::test_sqrt FAILED                                 [ 56%]
test_rounding.py::TestRounding::test_ceil FAILED                         [ 57%]
test_rounding.py::TestRounding::test_fix FAILED                          [ 57%]
test_rounding.py::TestRounding::test_floor FAILED                        [ 58%]
test_rounding.py::TestRounding::test_rint FAILED                         [ 59%]
test_rounding.py::TestRounding::test_rint_negative FAILED                [ 59%]
test_rounding.py::TestRounding::test_trunc FAILED                        [ 60%]
test_trigonometric.py::TestTrigonometric::test_arctan FAILED             [ 89%]
test_trigonometric.py::TestTrigonometric::test_arctan2 FAILED            [ 90%]
test_trigonometric.py::TestTrigonometric::test_cos FAILED                [ 90%]
test_trigonometric.py::TestTrigonometric::test_deg2rad FAILED            [ 91%]
test_trigonometric.py::TestTrigonometric::test_hypot FAILED              [ 91%]
test_trigonometric.py::TestTrigonometric::test_rad2deg FAILED            [ 92%]
test_trigonometric.py::TestTrigonometric::test_sin FAILED                [ 92%]
test_trigonometric.py::TestTrigonometric::test_tan FAILED                [ 93%]

@vorj vorj force-pushed the 224-check-cl_khr_fp16-support branch from 2c3075b to bf0304f Compare February 4, 2020 04:18
@vorj vorj force-pushed the 224-check-cl_khr_fp16-support branch from bf0304f to 43e8d6f Compare February 4, 2020 05:22
@vorj vorj marked this pull request as ready for review February 4, 2020 05:33
@vorj
Copy link
Author

vorj commented Feb 4, 2020

@LWisteria The CI has passed. Please review this PR.

@vorj vorj requested a review from LWisteria February 4, 2020 06:04
@vorj
Copy link
Author

vorj commented Feb 4, 2020

Of course this PR is too ad-hoc, so we should use this as temporary solution and will revert this in the future if this PR will be merged.

Copy link
Member

@LWisteria LWisteria left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Skipping CI if no fp16 support is a bad idea. I won't approve of this PR.

@LWisteria LWisteria assigned vorj and unassigned LWisteria Feb 4, 2020
@LWisteria
Copy link
Member

@vorj Removing CI tests needing fp16 support looks better for me.

@vorj
Copy link
Author

vorj commented Feb 4, 2020

@LWisteria You mean that we should remove all of codes related to half (temporarily), right?

@LWisteria
Copy link
Member

@vorj Actually, you don't need to do that. It's just ideally better than this PR, that's why I won't approve.

@vorj
Copy link
Author

vorj commented Feb 4, 2020

@LWisteria I didn't talk about my task, I just want to understand what you told more correctly.

BTW, for my information, I want to know the usecase of skipping test, because it seems that my opinion about that is wrong.
Do you know the location for some good description about that?

@LWisteria
Copy link
Member

@vorj As you know, the primary reason for the problem is ClPy's insufficiency of fp16 support.
Therefore, skipping some tests and/or disabling cl_khr_fp16 if the device doesn't support it will solve nothing, but just only pass CI.

Only passing CI must not be your goal.

@vorj
Copy link
Author

vorj commented Feb 4, 2020

@LWisteria

Therefore, skipping some tests and/or disabling cl_khr_fp16 if the device doesn't support it will solve nothing, but just only pass CI.

This sentence is true, then what the difference between removing the test cases and skipping them? IMHO, removing tests will solve nothing as well as this PR.

Only passing CI must not be your goal.

I haven't said that, I told that we should revert this in the future if we will merge this PR. I have never thought that this PR solves the core issue, but I think that broken CI should be fixed in short order.
As you said at #261 , the CI issue is caused by the environment broken of our secondary machine, but it means that users who install CUDA 10.2 can't use ClPy at thier own environment for now. I think that this should be fixed.

@vorj vorj mentioned this pull request Feb 4, 2020
@LWisteria
Copy link
Member

the difference between removing the test cases and skipping them

I meant that removing the test from CI, not from unit-tests itself, which guarantees functionalities of current and/or future ClPy.
Modifying the tests means that we decided to change our goal, to be compatible with CuPy as much as possible.

We don't have enough discussions to do that. And I won't agree with it now.

I think that this should be fixed.

I agree. However, we must not treat symptoms, remove the bottom causes.

We don't have to hurry so much. Now you waste your costs for the symptomatic treatment.

@vorj
Copy link
Author

vorj commented Feb 4, 2020

@LWisteria

I meant that removing the test from CI, not from unit-tests itself, which guarantees functionalities of current and/or future ClPy.
Modifying the tests means that we decided to change our goal, to be compatible with CuPy as much as possible.

Ah, OK, I understand. Thank you for your explanation.
BTW, I think that it will be painful task that removing the test cases from CI, because we will need to list so many valid test cases like test_fusion.py::TestFusionFloating::test_signbit , and so on.
(Of course, I don't think that we should push forward this PR just because the substitute task will be painful.)

We don't have to hurry so much.

Hmm, well, any user doesn't make the ticket like #239 recently, so I kind of agree.

@vorj
Copy link
Author

vorj commented Feb 4, 2020

Now you waste your costs for the symptomatic treatment.

No, I had already wasted (it's just joke).

@LWisteria
Copy link
Member

After #269, this PR is obsolete. I'm closing but not deleting this branch for the further development.

@LWisteria LWisteria closed this Feb 22, 2020
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.

3 participants