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

Update time op to more accurately get device time #2104

Merged
merged 9 commits into from
Oct 11, 2023
Merged

Conversation

pfultz2
Copy link
Collaborator

@pfultz2 pfultz2 commented Aug 21, 2023

Attaching events to the launch kernel has a lot of overhead. Instead run the op in the loop, and then add a hip event at the end of the loop.

@codecov
Copy link

codecov bot commented Aug 21, 2023

Codecov Report

Merging #2104 (1d24562) into develop (c58e7d8) will decrease coverage by 0.01%.
Report is 4 commits behind head on develop.
The diff coverage is 100.00%.

❗ Current head 1d24562 differs from pull request most recent head 1704518. Consider uploading reports for the commit 1704518 to get more accurate results

@@             Coverage Diff             @@
##           develop    #2104      +/-   ##
===========================================
- Coverage    91.45%   91.45%   -0.01%     
===========================================
  Files          433      433              
  Lines        16175    16174       -1     
===========================================
- Hits         14793    14792       -1     
  Misses        1382     1382              
Files Coverage Δ
src/api/api.cpp 72.36% <ø> (ø)
src/api/include/migraphx/migraphx.hpp 98.63% <ø> (ø)
src/include/migraphx/auto_register.hpp 100.00% <ø> (ø)
src/include/migraphx/float_equal.hpp 100.00% <ø> (ø)
src/include/migraphx/generate.hpp 76.92% <ø> (ø)
src/include/migraphx/instruction_ref.hpp 100.00% <ø> (ø)
src/include/migraphx/matcher.hpp 97.13% <ø> (-0.02%) ⬇️
src/include/migraphx/op/nonmaxsuppression.hpp 98.47% <ø> (ø)
src/include/migraphx/op/roialign.hpp 99.16% <ø> (ø)
src/include/migraphx/optional.hpp 100.00% <ø> (ø)
... and 3 more

@migraphx-bot
Copy link
Collaborator

migraphx-bot commented Aug 22, 2023

Test Batch Rate new
1d4c58
Rate old
e07b7c
Diff Compare
torchvision-resnet50 64 2,325.51 2,320.06 0.23%
torchvision-resnet50_fp16 64 5,362.56 5,353.68 0.17%
torchvision-densenet121 32 1,848.72 1,842.18 0.35%
torchvision-densenet121_fp16 32 3,403.46 3,412.09 -0.25%
torchvision-inceptionv3 32 1,297.32 1,293.34 0.31%
torchvision-inceptionv3_fp16 32 2,525.45 2,539.42 -0.55%
cadene-inceptionv4 16 620.44 619.92 0.08%
cadene-resnext64x4 16 588.83 589.07 -0.04%
slim-mobilenet 64 7,204.93 7,219.97 -0.21%
slim-nasnetalarge 64 236.53 236.23 0.13%
slim-resnet50v2 64 2,555.84 2,556.43 -0.02%
bert-mrpc-onnx 8 824.99 825.47 -0.06%
bert-mrpc-tf 1 389.17 388.10 0.28%
pytorch-examples-wlang-gru 1 299.44 296.27 1.07%
pytorch-examples-wlang-lstm 1 315.47 316.06 -0.19%
torchvision-resnet50_1 1 548.49 547.74 0.14%
torchvision-inceptionv3_1 1 301.50 305.30 -1.25%
cadene-dpn92_1 1 356.75 351.99 1.35%
cadene-resnext101_1 1 219.66 218.06 0.73%
slim-vgg16_1 1 224.45 223.86 0.26%
slim-mobilenet_1 1 1,520.15 1,498.13 1.47%
slim-inceptionv4_1 1 214.91 213.83 0.51%
onnx-taau-downsample 1 305.05 306.25 -0.39%
dlrm-criteoterabyte 1 21.69 21.68 0.03%
dlrm-criteoterabyte_fp16 1 40.75 40.62 0.32%
agentmodel 1 5,871.54 5,817.78 0.92%
unet_fp16 2 55.17 55.18 -0.02%
resnet50v1_fp16 1 758.35 759.76 -0.19%
bert_base_cased_fp16 64 971.02 970.69 0.03%
bert_large_uncased_fp16 32 305.04 305.01 0.01%
bert_large_fp16 1 166.77 167.09 -0.20%
distilgpt2_fp16 16 1,351.59 1,277.85 5.77% 🔆

Check results before merge 🔆

@migraphx-bot
Copy link
Collaborator

migraphx-bot commented Aug 22, 2023


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

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

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

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

    :white_check_mark:torchvision-resnet50_1: PASSED: MIGraphX meets tolerance

    :white_check_mark:torchvision-inceptionv3_1: PASSED: MIGraphX meets tolerance

    :white_check_mark:cadene-dpn92_1: PASSED: MIGraphX meets tolerance

    :white_check_mark:cadene-resnext101_1: PASSED: MIGraphX meets tolerance

    :white_check_mark:slim-vgg16_1: PASSED: MIGraphX meets tolerance

    :white_check_mark:slim-mobilenet_1: PASSED: MIGraphX meets tolerance

    :white_check_mark:slim-inceptionv4_1: PASSED: MIGraphX meets tolerance

    :white_check_mark:dlrm-criteoterabyte: PASSED: MIGraphX meets tolerance

    :white_check_mark:agentmodel: PASSED: MIGraphX meets tolerance

    :white_check_mark:unet: PASSED: MIGraphX meets tolerance

    :white_check_mark:resnet50v1: PASSED: MIGraphX meets tolerance

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


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


    :white_check_mark:bert_large: PASSED: MIGraphX meets tolerance

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

@causten
Copy link
Collaborator

causten commented Sep 28, 2023

this fails when I tested it with mlir

root@ce81174f8f3c:/workspace/AMDMIGraphX# MIGRAPHX_ENABLE_MLIR=1 migraphx-driver perf /models/mlperf/resnet50_v1.onnx
Compiling ...
Reading: /models/mlperf/resnet50_v1.onnx
Benchmarking gpu::mlir_op: 21 configs
terminate called after throwing an instance of 'migraphx::version_2_7_0::exception'
what(): /workspace/AMDMIGraphX/src/targets/gpu/include/migraphx/gpu/context.hpp:333: get_elapsed_ms: Failed hipEventElapsedTime: invalid resource handle
Aborted (core dumped)

@pfultz2
Copy link
Collaborator Author

pfultz2 commented Oct 3, 2023

this fails when I tested it with mlir

Fixed.

@causten causten merged commit 34b68ee into develop Oct 11, 2023
14 of 15 checks passed
@causten causten deleted the time-op-device-time branch October 11, 2023 18:28
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.

4 participants