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

thrust::device.on(stream).after(event) #1195

@brycelelbach

Description

@brycelelbach

thrust::device.on(stream).after(event) doesn't work; sort relies on doing .after internally, thus thrust::async::sort(thrust::device.on(stream), ...) doesn't work.

This is because execute_on_stream doesn't combine with other execution policy properties. Unfortunately making it work that way would require an exponential explosion of intermediate policies:

  • execute_with_allocator_and_stream
  • execute_with_dependencies_and_stream
  • execute_with_allocator_and_dependencies_and_stream

The easiest solution is probably to just fold the functional of execute_on_stream into execute_with_dependencies, which can already express and hold streams.

The only downside with that approach is that .on().on().on() would leave you with a large tuple holding some useless streams.

Also there is a testing gap here.

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions