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

Implement hybrid thread/warp parallel kernel for get_json_object #2258

Merged
merged 6 commits into from
Jul 25, 2024

Conversation

ttnghia
Copy link
Collaborator

@ttnghia ttnghia commented Jul 25, 2024

Instead of selecting either a thread-parallel or warp-parallel kernel depending on the input row size, this approach implements a different hybrid kernel such that:

  • Each warp always processes at max one input row.
  • The number of active threads in a warp depends on the number of JSON paths. The number of warps processing one row is computed as ceil(num_path / warp_size).

ttnghia added 6 commits July 25, 2024 10:16
Signed-off-by: Nghia Truong <[email protected]>
Signed-off-by: Nghia Truong <[email protected]>
Signed-off-by: Nghia Truong <[email protected]>
Signed-off-by: Nghia Truong <[email protected]>
@ttnghia ttnghia requested a review from revans2 July 25, 2024 18:10
@ttnghia ttnghia self-assigned this Jul 25, 2024
@ttnghia
Copy link
Collaborator Author

ttnghia commented Jul 25, 2024

Tested thread-parallel vs warp parallel vs hybrid kernel, with a small (fingerprint) dataset:

thread par, max path size:
2: 40s
4: 17s
6: 15s
8: 11.8s
10: 9.3s
16: 7.6s
32: 5.9s

warp par, max path size:
2: 19s
4: 13s
6: 13s
8: 12s
10: 11.5s
16: 10.6s
32: 10.2s

hybrid thread/warp par, max path size:
2: 17.2s
4: 11s
6: 10s
8: 8s
10: 7.6s
16: 6.4s
32: 5.6s

@ttnghia
Copy link
Collaborator Author

ttnghia commented Jul 25, 2024

build

Copy link
Collaborator

@revans2 revans2 left a comment

Choose a reason for hiding this comment

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

The volatility is better, and the low parallelism performance is much better, but it didn't really improve the average performance for the one test case I ran. I think that is okay, because there are less performance low spots that we could hit.

parallelism scaling (1)

@revans2
Copy link
Collaborator

revans2 commented Jul 25, 2024

To be clear the chart is comparing against #2256 (review) and I still want to run some more tests, but I think this is good to go.

@ttnghia ttnghia merged commit fd0542c into NVIDIA:branch-24.08 Jul 25, 2024
4 checks passed
@ttnghia ttnghia deleted the hybrid_warp_parallel branch July 25, 2024 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants