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

Remove usage of THRUST host&device vector #5439

Merged
merged 1 commit into from
Apr 23, 2024

Conversation

JanuszL
Copy link
Contributor

@JanuszL JanuszL commented Apr 19, 2024

  • as there is no guarantee that THRUST host and device
    vectors can be used in host-only programs this PR removes
    their usage from DALI

Category:

Other (e.g. Documentation, Tests, Configuration)

Description:

Additional information:

Affected modules and functionalities:

  • mostly tests

Key points relevant for the review:

  • NA

Tests:

  • Existing tests apply
  • New tests added
    • Python tests
    • GTests
    • Benchmark
    • Other
  • N/A

Checklist

Documentation

  • Existing documentation applies
  • Documentation updated
    • Docstring
    • Doxygen
    • RST
    • Jupyter
    • Other
  • N/A

DALI team only

Requirements

  • Implements new requirements
  • Affects existing requirements
  • N/A

REQ IDs: N/A

JIRA TASK: N/A

@JanuszL JanuszL marked this pull request as draft April 19, 2024 19:01
@JanuszL JanuszL force-pushed the remove_thrust_sage branch 2 times, most recently from c6a3dd2 to b2bc44b Compare April 22, 2024 09:19
@JanuszL
Copy link
Contributor Author

JanuszL commented Apr 22, 2024

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [14417381]: BUILD STARTED

@JanuszL JanuszL changed the title Remove usage of TRHUTS host&device vector Remove usage of THRUST host&device vector Apr 22, 2024
@JanuszL JanuszL marked this pull request as ready for review April 22, 2024 09:29
@JanuszL JanuszL force-pushed the remove_thrust_sage branch from b2bc44b to 67aa28a Compare April 22, 2024 09:29
template<typename T>
thrust::device_vector<T> random_vector_gpu(std::mt19937 &mt, size_t size) {
thrust::device_vector<T> ret = random_vector_cpu<T>(mt, size);
Fill(ret.cpu(), gen);
Copy link
Contributor

@mzient mzient Apr 22, 2024

Choose a reason for hiding this comment

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

Even better:

Suggested change
Fill(ret.cpu(), gen);
UniformRandomFill(ret.cpu(), mt, 0, 255);

...and get rid of the dist/gen.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

- as there is no guarantee that THRUST host and device
  vectors can be used in host-only programs this PR removes
  their usage from DALI

Signed-off-by: Janusz Lisiecki <[email protected]>
@JanuszL JanuszL force-pushed the remove_thrust_sage branch from 67aa28a to ecec3dc Compare April 22, 2024 10:29
@mzient mzient self-assigned this Apr 22, 2024
@JanuszL
Copy link
Contributor Author

JanuszL commented Apr 22, 2024

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [14418852]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [14417381]: BUILD PASSED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [14418852]: BUILD PASSED

@JanuszL JanuszL merged commit daf1fea into NVIDIA:main Apr 23, 2024
7 checks passed
@JanuszL JanuszL deleted the remove_thrust_sage branch April 23, 2024 07:01
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.

5 participants