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

Move device code in get_json_object to cu or cuh #1915

Merged

Conversation

thirtiseven
Copy link
Collaborator

Contributes to #1906

This PR:

  • Move Kernel code to cuh file.
  • Expose MAX_PATH_DEPTH in JSONUtils.java (will call it from plugin in a plugin PR).

I think we can make this moving code change first so it will be easy to review when addressing other comments.

@thirtiseven thirtiseven requested a review from res-life April 1, 2024 08:58
@thirtiseven thirtiseven self-assigned this Apr 1, 2024
@@ -23,6 +23,8 @@ public class JSONUtils {
NativeDepsLoader.loadNativeDeps();
}

public static final int MAX_PATH_DEPTH = 32;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I did not find any usage for this new variable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It will be used in plugin, for max path instructions fallback.

res-life
res-life previously approved these changes Apr 2, 2024
@thirtiseven
Copy link
Collaborator Author

build

@thirtiseven thirtiseven changed the base branch from branch-24.04 to branch-24.06 April 2, 2024 02:26
@thirtiseven thirtiseven dismissed res-life’s stale review April 2, 2024 02:26

The base branch was changed.

@thirtiseven
Copy link
Collaborator Author

build

@thirtiseven thirtiseven merged commit 6cba28f into NVIDIA:branch-24.06 Apr 2, 2024
4 checks passed
@thirtiseven thirtiseven deleted the get-json-object-follow-up branch April 2, 2024 04:51
res-life pushed a commit to res-life/spark-rapids-jni that referenced this pull request Apr 7, 2024
res-life pushed a commit to res-life/spark-rapids-jni that referenced this pull request Apr 8, 2024
res-life added a commit that referenced this pull request Apr 11, 2024
…1930)

* Move device code in get_json_object to cu or cuh (#1915)

Signed-off-by: Haoyang Li <[email protected]>

* Refactor/simplify json generator

Signed-off-by: Chong Gao <[email protected]>

* Remove purge non-empty nulls step

* Refactor josn parser: remove useless variables

* Use 64 bits to store JSON nest depth context to save memory

* Refine push/pop/peek logic

* Refactor: use less functions; change max path length from 32 to 8

* Fix nvbug: get-json-obj get incorrect result on some GPUs(H100, V100)

* Revert "Fix nvbug: get-json-obj get incorrect result on some GPUs(H100, V100)"

This reverts commit ff2db7e.

* Fix a redefined variable

* Update MAX_PATH_DEPTH = 8 in Java to keep consistent

* Fix test cases; Change max path depth from 8 to 16

* Minor change: add pragma once in header

---------

Signed-off-by: Haoyang Li <[email protected]>
Signed-off-by: Chong Gao <[email protected]>
Co-authored-by: Haoyang Li <[email protected]>
Co-authored-by: Chong Gao <[email protected]>
thirtiseven added a commit that referenced this pull request Apr 11, 2024
* Move device code in get_json_object to cu or cuh (#1915)

Signed-off-by: Haoyang Li <[email protected]>

* Refactor/simplify json generator

Signed-off-by: Chong Gao <[email protected]>

* Remove purge non-empty nulls step

* Refactor josn parser: remove useless variables

* Use 64 bits to store JSON nest depth context to save memory

* Refine push/pop/peek logic

* Refactor: use less functions; change max path length from 32 to 8

* Fix nvbug: get-json-obj get incorrect result on some GPUs(H100, V100)

* Revert "Fix nvbug: get-json-obj get incorrect result on some GPUs(H100, V100)"

This reverts commit ff2db7e.

* Fix a redefined variable

* Update MAX_PATH_DEPTH = 8 in Java to keep consistent

* Fix test cases; Change max path depth from 8 to 16

* Minor change: add pragma once in header

* Fix a bug in string_to_float and move it to jni temporarily

Signed-off-by: Haoyang Li <[email protected]>

* Address comments

Signed-off-by: Haoyang Li <[email protected]>

---------

Signed-off-by: Haoyang Li <[email protected]>
Signed-off-by: Chong Gao <[email protected]>
Co-authored-by: Chong Gao <[email protected]>
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.

2 participants