Skip to content

Conversation

@fcharras
Copy link
Contributor

@fcharras fcharras commented Dec 29, 2023

What does this implement/fix? Explain your changes.

Adds a note in the array api documentation that documents scikit-learn policy regarding support of devices that do not support float64 precision operations. (basically stating that it favors consistency with CPU behavior at the cost of data transfers to CPU, over remaining on the device at the cost of capping compute to highest supported precision)

Discuted before with @betatim and @ogrisel , in particular during review of #27904

@github-actions
Copy link

github-actions bot commented Dec 29, 2023

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 929261f. Link to the linter CI: here

@glemaitre glemaitre changed the title Add note in Array API doc regarding support for devices without float 64 support DOC Add note in Array API doc regarding support for devices without float 64 support Jan 12, 2024
@glemaitre glemaitre self-requested a review January 12, 2024 09:48
Copy link
Member

@glemaitre glemaitre left a comment

Choose a reason for hiding this comment

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

LGTM apart from those nitpicks.

a transfer to CPU.

Minimizing the usage of float64 upcasting in scikit-learn is an open improvement
direction, to maybe yield better performance from devices that do not support it,
Copy link
Member

@glemaitre glemaitre Jan 12, 2024

Choose a reason for hiding this comment

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

Suggested change
direction, to maybe yield better performance from devices that do not support it,
direction, to yield better performance from devices that do not support it,

Copy link
Member

Choose a reason for hiding this comment

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

I think we need the "yield"

Copy link
Member

Choose a reason for hiding this comment

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

Oh actually, I wanted to remove the "maybe"

Copy link
Member

Choose a reason for hiding this comment

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

I can't reconstruct what I meant to say. Reading my comment now I am confused.com about what I was trying to say (it seems like a comment written while distracted) :-/

Let's ignore it?

Co-authored-by: Guillaume Lemaitre <guillaume@probabl.ai>
@betatim
Copy link
Member

betatim commented Feb 12, 2024

I've applied all the suggestions. I think they are uncontroversial typo fixes. The one I didn't apply is because I don't think it makes sense.

@glemaitre maybe you can take another look and then merge?

@glemaitre
Copy link
Member

I'm still +1 until that this actually the policy that we use. It seems that it was questioned in this PR: #27904 (comment)

I would delay a merge until we settle on the matter.

@jeremiedbb
Copy link
Member

A section about float64 was added to array_api.rst in #29433, and the policy pictured in this PR seems outdated since the one in the current doc is a bit different. With that in mind I'm closing this PR.

@jeremiedbb jeremiedbb closed this Jul 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants