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

Fixed multilevel pointer conversion tidy check errors and re-enable t… #3615

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

taylding-amd
Copy link
Contributor

Fix #3472, fix the multilevel pointer conversion tidy check, and re-enable the check. I had to remove a couple of not_operation checks to pass the tidy check.

@TedThemistokleous TedThemistokleous added the Cleanup Cleans up code from stale bits/warnings/previous changes for a previous feature PR label Nov 13, 2024
EXPECT(test::throws([&] { migraphx::any_cast<not_operation&>(op1); }));
migraphx::operation op2 = simple_operation{2};
EXPECT(migraphx::any_cast<simple_operation>(op2).data == 2);
EXPECT(migraphx::any_cast<not_operation*>(&op2) == nullptr);
Copy link
Collaborator

Choose a reason for hiding this comment

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

We shouldn't be modifying the test for this. Those checks are there to ensure that these resolve correctly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added the tests back

@@ -134,7 +134,7 @@ void kernel::launch(hipStream_t stream,
hipEvent_t stop) const
{
assert(impl != nullptr);
void* kernargs = args.data();
void* kernargs = reinterpret_cast<void*>(args.data());
Copy link
Collaborator

Choose a reason for hiding this comment

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

This makes sense here.

Copy link

codecov bot commented Nov 13, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.18%. Comparing base (b39a938) to head (94686d1).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3615   +/-   ##
========================================
  Coverage    92.18%   92.18%           
========================================
  Files          513      513           
  Lines        21576    21576           
========================================
  Hits         19889    19889           
  Misses        1687     1687           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@TedThemistokleous TedThemistokleous left a comment

Choose a reason for hiding this comment

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

Looks good. Handle the format/tidy checks that are failing.

seeing this in the tidy check now.

57880 warnings generated.
Warning: multilevel pointer conversion from 'const char **' to 'void *', please use explicit cast [bugprone-multi-level-implicit-pointer-conversion,-warnings-as-errors]
  172 |         dnnl_primitive_desc_query(desc, dnnl_query_impl_info_str, 0, &str);
      |                                                                      ^

CMake Error at tidy-target-migraphx_cpu-pooling_cpp.cmake:83 (message):
  Clang tidy failed.


make[3]: *** [src/targets/cpu/CMakeFiles/tidy-target-migraphx_cpu-pooling_cpp.dir/build.make:71: src/targets/cpu/CMakeFiles/tidy-target-migraphx_cpu-pooling_cpp] Error 1
make[3]: Target 'src/targets/cpu/CMakeFiles/tidy-target-migraphx_cpu-pooling_cpp.dir/build' not remade because of errors.
make[2]: *** [CMakeFiles/Makefile2:18026: src/targets/cpu/CMakeFiles/tidy-target-migraphx_cpu-pooling_cpp.dir/all] Error 2
[ 20%] clang-tidy: Running clang-tidy on target compile_miopen.cpp...
59009 warnings generated.
Warning: multilevel pointer conversion from 'const char **' to 'void *', please use explicit cast [bugprone-multi-level-implicit-pointer-conversion,-warnings-as-errors]
  172 |         dnnl_primitive_desc_query(desc, dnnl_query_impl_info_str, 0, &str);
      |    

Format you can use with a git hook for formatting. check in tools/format.py

@migraphx-bot
Copy link
Collaborator

Test Batch Rate new
94686d
Rate old
b39a93
Diff Compare
torchvision-resnet50 64 3,258.90 3,258.87 0.00%
torchvision-resnet50_fp16 64 6,986.75 6,988.66 -0.03%
torchvision-densenet121 32 2,437.93 2,432.78 0.21%
torchvision-densenet121_fp16 32 4,046.61 4,101.38 -1.34%
torchvision-inceptionv3 32 1,628.52 1,627.93 0.04%
torchvision-inceptionv3_fp16 32 2,749.42 2,743.41 0.22%
cadene-inceptionv4 16 765.31 764.71 0.08%
cadene-resnext64x4 16 810.36 809.79 0.07%
slim-mobilenet 64 7,461.43 7,462.30 -0.01%
slim-nasnetalarge 64 208.53 208.39 0.07%
slim-resnet50v2 64 3,441.71 3,441.05 0.02%
bert-mrpc-onnx 8 1,148.60 1,151.55 -0.26%
bert-mrpc-tf 1 467.76 469.89 -0.45%
pytorch-examples-wlang-gru 1 424.75 438.68 -3.18% 🔴
pytorch-examples-wlang-lstm 1 412.38 384.52 7.25% 🔆
torchvision-resnet50_1 1 771.97 773.59 -0.21%
cadene-dpn92_1 1 399.04 402.80 -0.93%
cadene-resnext101_1 1 383.04 383.13 -0.02%
onnx-taau-downsample 1 345.92 345.42 0.14%
dlrm-criteoterabyte 1 33.34 33.30 0.12%
dlrm-criteoterabyte_fp16 1 52.73 52.73 -0.00%
agentmodel 1 8,120.31 8,187.33 -0.82%
unet_fp16 2 58.78 58.82 -0.07%
resnet50v1_fp16 1 971.06 933.18 4.06% 🔆
resnet50v1_int8 1 1,007.25 1,017.62 -1.02%
bert_base_cased_fp16 64 1,169.86 1,171.03 -0.10%
bert_large_uncased_fp16 32 363.72 363.30 0.11%
bert_large_fp16 1 200.80 199.02 0.90%
distilgpt2_fp16 16 2,202.80 2,201.62 0.05%
yolov5s 1 537.38 534.34 0.57%
tinyllama 1 43.47 43.42 0.11%
vicuna-fastchat 1 170.95 177.52 -3.70% 🔴
whisper-tiny-encoder 1 418.36 418.19 0.04%
whisper-tiny-decoder 1 427.79 427.01 0.18%

This build is not recommended to merge 🔴

@migraphx-bot
Copy link
Collaborator


     ✅ bert-mrpc-onnx: PASSED: MIGraphX meets tolerance

     ✅ bert-mrpc-tf: PASSED: MIGraphX meets tolerance

     ✅ pytorch-examples-wlang-gru: PASSED: MIGraphX meets tolerance

     ✅ pytorch-examples-wlang-lstm: PASSED: MIGraphX meets tolerance

     ✅ torchvision-resnet50_1: PASSED: MIGraphX meets tolerance

     ✅ cadene-dpn92_1: PASSED: MIGraphX meets tolerance

     ✅ cadene-resnext101_1: PASSED: MIGraphX meets tolerance

     ✅ dlrm-criteoterabyte: PASSED: MIGraphX meets tolerance

     ✅ agentmodel: PASSED: MIGraphX meets tolerance

     ✅ unet: PASSED: MIGraphX meets tolerance

     ✅ resnet50v1: PASSED: MIGraphX meets tolerance

     ✅ bert_base_cased_fp16: PASSED: MIGraphX meets tolerance

🔴bert_large_uncased_fp16: FAILED: MIGraphX is not within tolerance - check verbose output


     ✅ bert_large: PASSED: MIGraphX meets tolerance

     ✅ yolov5s: PASSED: MIGraphX meets tolerance

     ✅ tinyllama: PASSED: MIGraphX meets tolerance

     ✅ vicuna-fastchat: PASSED: MIGraphX meets tolerance

     ✅ whisper-tiny-encoder: PASSED: MIGraphX meets tolerance

     ✅ whisper-tiny-decoder: PASSED: MIGraphX meets tolerance

     ✅ distilgpt2_fp16: PASSED: MIGraphX meets tolerance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Cleanup Cleans up code from stale bits/warnings/previous changes for a previous feature PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Uncomment -bugprone-multi-level-implicit-pointer-conversion
3 participants