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 3 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 (8176666).

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.

@migraphx-bot
Copy link
Collaborator

Test Batch Rate new
817666
Rate old
b39a93
Diff Compare
torchvision-resnet50 64 3,256.20 3,259.98 -0.12%
torchvision-resnet50_fp16 64 6,982.02 6,991.63 -0.14%
torchvision-densenet121 32 2,433.63 2,436.76 -0.13%
torchvision-densenet121_fp16 32 4,052.59 4,076.33 -0.58%
torchvision-inceptionv3 32 1,626.64 1,630.75 -0.25%
torchvision-inceptionv3_fp16 32 2,741.42 2,750.13 -0.32%
cadene-inceptionv4 16 764.91 766.23 -0.17%
cadene-resnext64x4 16 811.19 811.64 -0.06%
slim-mobilenet 64 7,459.76 7,471.32 -0.15%
slim-nasnetalarge 64 208.41 208.48 -0.03%
slim-resnet50v2 64 3,440.60 3,441.77 -0.03%
bert-mrpc-onnx 8 1,153.93 1,151.97 0.17%
bert-mrpc-tf 1 504.67 492.75 2.42%
pytorch-examples-wlang-gru 1 416.57 417.46 -0.21%
pytorch-examples-wlang-lstm 1 384.62 406.83 -5.46% 🔴
torchvision-resnet50_1 1 744.67 775.10 -3.93% 🔴
cadene-dpn92_1 1 399.81 421.44 -5.13% 🔴
cadene-resnext101_1 1 383.42 383.26 0.04%
onnx-taau-downsample 1 345.73 346.67 -0.27%
dlrm-criteoterabyte 1 33.32 33.33 -0.00%
dlrm-criteoterabyte_fp16 1 52.73 52.76 -0.06%
agentmodel 1 9,935.42 9,419.30 5.48% 🔆
unet_fp16 2 58.88 58.87 0.02%
resnet50v1_fp16 1 1,014.14 941.94 7.67% 🔆
resnet50v1_int8 1 1,022.30 985.94 3.69% 🔆
bert_base_cased_fp16 64 1,171.44 1,171.42 0.00%
bert_large_uncased_fp16 32 363.35 363.44 -0.03%
bert_large_fp16 1 200.42 200.59 -0.09%
distilgpt2_fp16 16 2,201.39 2,203.62 -0.10%
yolov5s 1 534.34 526.10 1.57%
tinyllama 1 43.41 43.40 0.03%
vicuna-fastchat 1 171.78 172.63 -0.49%
whisper-tiny-encoder 1 418.52 418.90 -0.09%
whisper-tiny-decoder 1 429.80 428.52 0.30%

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

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

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