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

Add number normalization test and address followup for getJsonObject #10800

Merged

Conversation

thirtiseven
Copy link
Collaborator

@thirtiseven thirtiseven commented May 13, 2024

closes #10688
closes #10646

A minor follow-up pr for getJsonObject

This pr:

  • Query max instructions length from JNI instead of hardcoding in plugin code.
  • Adds tests for floating number normalization, it was fixed but didn't add cases in plugin.

Signed-off-by: Haoyang Li <haoyangl@nvidia.com>
@thirtiseven thirtiseven requested a review from res-life May 13, 2024 08:15
@thirtiseven thirtiseven self-assigned this May 13, 2024
else:
return float(x)
for i in range(len(gpu_res)):
assert math.isclose(json_string_to_float(gpu_res[i][0]), json_string_to_float(cpu_res[i][0]))
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: Add a comment like:
verify relatively diff < 1.0e-7

@res-life
Copy link
Collaborator

How long this test case will run? < one minute?

res-life
res-life previously approved these changes May 13, 2024
Copy link
Collaborator

@res-life res-life left a comment

Choose a reason for hiding this comment

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

LGTM

Signed-off-by: Haoyang Li <haoyangl@nvidia.com>
Signed-off-by: Haoyang Li <haoyangl@nvidia.com>
@thirtiseven
Copy link
Collaborator Author

How long this test case will run? < one minute?

Yes. We used to run a case locally with a very large length, so it was slow, now it run fast with default length.

@thirtiseven
Copy link
Collaborator Author

build

@thirtiseven thirtiseven merged commit 3066373 into NVIDIA:branch-24.06 May 13, 2024
43 of 44 checks passed
@thirtiseven thirtiseven deleted the get_json_object_follow_up branch May 13, 2024 11:35
@sameerz sameerz added the task Work required that improves the product but is not user facing label May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task Work required that improves the product but is not user facing
Projects
None yet
3 participants