Skip to content

Conversation

JanuszL
Copy link
Contributor

@JanuszL JanuszL commented Oct 8, 2024

  • adds support for bool types inside the numba operator
  • adds a test for that for CPU and GPU

Category:

New feature (non-breaking change which adds functionality)

Description:

  • adds support for bool types inside the numba operator
  • adds a test for that for CPU and GPU

Additional information:

Affected modules and functionalities:

  • numba operator

Key points relevant for the review:

  • NA

Tests:

  • Existing tests apply
  • New tests added
    • Python tests
      • new case for test_numba_func .test_numba_func and test_numba_func .test_numba_func_gpu
    • 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
Copy link
Contributor Author

JanuszL commented Oct 8, 2024

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19138731]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19138731]: BUILD FAILED

- adds support for bool types inside the numba operator
- adds a test for that for CPU and GPU

Signed-off-by: Janusz Lisiecki <[email protected]>
@JanuszL
Copy link
Contributor Author

JanuszL commented Oct 8, 2024

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19139148]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19139148]: BUILD PASSED

@mzient mzient self-assigned this Oct 9, 2024
Comment on lines 53 to 56
for z in range(tz, out0.shape[0], z_s):
for y in range(ty, out0.shape[1], y_s):
for x in range(tx, out0.shape[2], x_s):
out0[z][y][x] = 1
Copy link
Contributor

@mzient mzient Oct 9, 2024

Choose a reason for hiding this comment

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

Is it how it's done in numba, or can/should we use a more pythonic/numpyic way?

Suggested change
for z in range(tz, out0.shape[0], z_s):
for y in range(ty, out0.shape[1], y_s):
for x in range(tx, out0.shape[2], x_s):
out0[z][y][x] = 1
out0[tz::z_s, ty::y_s, tx::x_s] = 1

Signed-off-by: Janusz Lisiecki <[email protected]>
@JanuszL
Copy link
Contributor Author

JanuszL commented Oct 9, 2024

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19173232]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [19173232]: BUILD PASSED

@JanuszL JanuszL merged commit 94b563a into NVIDIA:main Oct 10, 2024
7 checks passed
@JanuszL JanuszL deleted the add_bool_numba branch October 10, 2024 07:07
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