ivy icon indicating copy to clipboard operation
ivy copied to clipboard

Reformat device

Open mattbarrett98 opened this issue 3 years ago • 11 comments

As explained in the function reformatting open task, each function in the device submodule should be updated to follow the implementation instructions given in the Deep Dive section of the docs. The updates should be applied for both the Ivy API and Backend API. The Deep Dive is the best general resource for learning in detail how functions should be implemented. Many of the functions are not implemented as they should be. You will need to make changes to the current implementations, but you do not need to go through all section of the Deep Dive. Specifically, you should make the following changes, where appropriate:

  1. remove all lambda and direct bindings for backend functions, with each function instead defined using def.
  2. update the function arguments and type hints.
  3. add the correct docstrings
  4. add thorough docstring examples

_

Please keep in mind that the proper way to link an issue to this list is to comment "- [ ] #issue_number" while the issue's title only includes the name of the function you've chosen.

_

  • [ ] #26534
  • [x] #26816
  • [x] #1181
  • [ ] #25749
  • [x] #5498
  • [x] #2515
  • [x] #6291
  • [x] #1755
  • [x] #3986
  • [x] #1826
  • [x] #26072
  • [ ] #26080
  • [x] #1243
  • [x] #6954
  • [x] #25704
  • [ ] #26142
  • [x] #28199
  • [x] #26091
  • [x] #12906
  • [x] #1764
  • [x] #6957
  • [ ] #25710

The main file paths where these functions are likely to be added are:

  • ivy/functional/ivy/device.py

mattbarrett98 avatar Apr 04 '22 09:04 mattbarrett98

@AnnaTz Just asking, where exactly this dev_from_str function is? I'm unable to locate it.

joshiayush avatar Mar 08 '23 07:03 joshiayush

@joshiayush You're right, this function has been removed from our api since this list was composed. I will remove it here as well. Thanks for flagging!

AnnaTz avatar Mar 08 '23 10:03 AnnaTz

There's already a PR #11943 and issue for that

joshiayush avatar Mar 08 '23 10:03 joshiayush

I didn't see it, thanks

Aterg264 avatar Mar 08 '23 11:03 Aterg264

I just found out my PR #11940 is an spiritual successor to #1765, it got merged though!

joshiayush avatar Mar 08 '23 15:03 joshiayush

@joshiayush You're right, this function has been removed from our api since this list was composed. I will remove it here as well. Thanks for flagging!

Also, there's no to_dev function it is to_device now.

joshiayush avatar Mar 08 '23 15:03 joshiayush

  • [ ] #14182

Abhishek4666 avatar Apr 15 '23 05:04 Abhishek4666

default_device is marked as closed when it should be marked as done, as wrong pull request is assigned to it. It was completed with #11942 as you can back track through pull request comments.

gujjs avatar Jun 03 '23 22:06 gujjs

#814

owoeye-babatunde avatar Sep 11 '23 13:09 owoeye-babatunde

I just completed my task for #26142

IamSolomonChika avatar Sep 28 '23 11:09 IamSolomonChika

  • [ ] #26080

dadangsetio avatar Oct 12 '23 01:10 dadangsetio