Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

What operations can be done in-place? #238

Closed
HueHue44 opened this issue Nov 14, 2020 · 6 comments
Closed

What operations can be done in-place? #238

HueHue44 opened this issue Nov 14, 2020 · 6 comments
Assignees
Labels
area: docs Related to documentation. P1: should have Necessary, but not critical. question Inquiry. type: enhancement New feature or request.
Milestone

Comments

@HueHue44
Copy link

HueHue44 commented Nov 14, 2020

Hello! I was just wondering which available operations can be done in-place (using the same iterator as input and output)? Specifically for DeviceScanand DeviceSelect. It is not clear in the documentation whether this is never allowed, always allowed or sometimes allowed. So does anyone know if there is some strict ruling on everything? Otherwise, I would like to know how it works specifically for DeviceScanand DeviceSelect.

@HueHue44 HueHue44 changed the title What opeartions can be done in-place? What operations can be done in-place? Nov 14, 2020
@alliepiper alliepiper added the question Inquiry. label Nov 18, 2020
@alliepiper
Copy link
Collaborator

DeviceScan can be run in-place, since each block will only read/write the portion of the input it is assigned.

I'm not sure about DeviceSelect -- from looking at the implementation it appears that there may be race conditions if run in-place, though I'd need to dig in a bit more to be absolutely sure. For now, I'd avoid running DeviceSelect in place.

We should check this for each algorithm and update the documentation at some point.

@alliepiper alliepiper added the only: docs Documentation changes only. Doesn't need code CI. label Nov 18, 2020
@HueHue44
Copy link
Author

Alrighty, good to know that the scan can be run in palace. I'll be on the safe with DeviceSelect for now then. Thanks for the info!

@benbarsdell
Copy link
Member

I'm also interested in this (specifically for DeviceRadixSort). In addition to documentation, a runtime error check (at least an assertion) in cases where it's not supported would be valuable.

@alliepiper
Copy link
Collaborator

@senior-zero since this came up in our call today, can you add this information while you're going through the CUB device algorithms?

@alliepiper alliepiper added this to the 1.14.0 milestone May 26, 2021
@alliepiper alliepiper modified the milestones: 1.14.0, 1.15.0 Aug 17, 2021
@alliepiper alliepiper modified the milestones: 1.15.0, 1.16.0 Oct 15, 2021
@alliepiper alliepiper modified the milestones: 1.16.0, 1.17.0 Feb 7, 2022
@alliepiper alliepiper modified the milestones: 1.17.0, 2.0.0 May 9, 2022
@alliepiper alliepiper added type: enhancement New feature or request. P1: should have Necessary, but not critical. area: docs Related to documentation. and removed only: docs Documentation changes only. Doesn't need code CI. labels May 9, 2022
@gevtushenko
Copy link
Collaborator

Hello @HueHue44, @benbarsdell! I've created a series of PR that addresses in-place guarantees for various algorithms. Please, take a look at:

  • partition PR
  • sort PR
  • reduce PR
  • rle PR
  • select PR
  • histogram PR
  • adjacent difference PR
  • scan PR

@gevtushenko
Copy link
Collaborator

All of the mentioned PRs were merged, closing the issue. Let us know if there is any algorithm without document its in-place guarantees.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: docs Related to documentation. P1: should have Necessary, but not critical. question Inquiry. type: enhancement New feature or request.
Projects
None yet
Development

No branches or pull requests

4 participants