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

Remove the hard coded path in MIGRAPHX_CXX_COMPILER #3377

Merged
merged 5 commits into from
Oct 8, 2024

Conversation

raramakr
Copy link
Contributor

amdclang++/amdclang can be invoked without providing absolute path, since update-alternatives command has been run for these binaries This will also help to remove the hard coded paths in cmake target files for these compilers

Copy link

codecov bot commented Aug 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.02%. Comparing base (22df950) to head (f34d90c).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3377   +/-   ##
========================================
  Coverage    92.02%   92.02%           
========================================
  Files          509      509           
  Lines        21014    21014           
========================================
  Hits         19339    19339           
  Misses        1675     1675           

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

@pfultz2
Copy link
Collaborator

pfultz2 commented Aug 15, 2024

This should still use the absolute path so we can be sure its using the same compiler the developer set migraphx to build with. I dont see any reason why this should be changed either as it doesnt affect any users.

@raramakr
Copy link
Contributor Author

This should still use the absolute path so we can be sure its using the same compiler the developer set migraphx to build with. I dont see any reason why this should be changed either as it doesnt affect any users.

As part of our efforts to make ROCm relocatable , these hard coded paths need to be removed.

set(COMPILER_NAME ${GET_COMPILER_NAME})
endif()
endif()# end of CPU/GPU check
endif()
Copy link
Collaborator

@pfultz2 pfultz2 Oct 3, 2024

Choose a reason for hiding this comment

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

There shouldn't be any changes to cmake. The compiler_src.hpp should be updated to only use MIGRAPHX_CXX_COMPILER macro when its not windows:

struct MIGRAPHX_EXPORT src_compiler
{
#ifdef _WIN32
    fs::path compiler                         = MIGRAPHX_CXX_COMPILER;
#else
    fs::path compiler                         = "c++";
#endif
    std::vector<std::string> flags            = {};
    fs::path output                           = {};
    fs::path launcher                         = {};
    std::string out_ext                       = ".o";
    std::function<fs::path(fs::path)> process = nullptr;
    std::vector<char> compile(const std::vector<src_file>& srcs) const;
};

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you @pfultz2
Updated the PR as suggested

@migraphx-bot
Copy link
Collaborator

Test Batch Rate new
d68f73
Rate old
fc26f0
Diff Compare
torchvision-resnet50 64 3,240.31 3,261.06 -0.64%
torchvision-resnet50_fp16 64 6,881.20 6,993.61 -1.61%
torchvision-densenet121 32 2,428.60 2,434.05 -0.22%
torchvision-densenet121_fp16 32 4,063.94 4,095.98 -0.78%
torchvision-inceptionv3 32 1,634.23 1,638.20 -0.24%
torchvision-inceptionv3_fp16 32 2,736.94 2,759.48 -0.82%
cadene-inceptionv4 16 772.35 775.34 -0.39%
cadene-resnext64x4 16 807.91 808.43 -0.06%
slim-mobilenet 64 7,443.76 7,536.82 -1.23%
slim-nasnetalarge 64 207.54 211.47 -1.86%
slim-resnet50v2 64 3,343.96 3,501.50 -4.50% 🔴
bert-mrpc-onnx 8 1,149.97 1,149.92 0.00%
bert-mrpc-tf 1 310.27 465.24 -33.31% 🔴
pytorch-examples-wlang-gru 1 436.80 413.68 5.59% 🔆
pytorch-examples-wlang-lstm 1 413.93 379.94 8.95% 🔆
torchvision-resnet50_1 1 758.89 786.00 -3.45% 🔴
cadene-dpn92_1 1 396.62 400.42 -0.95%
cadene-resnext101_1 1 379.09 381.26 -0.57%
onnx-taau-downsample 1 344.32 343.07 0.36%
dlrm-criteoterabyte 1 35.09 33.36 5.17% 🔆
dlrm-criteoterabyte_fp16 1 57.41 52.73 8.88% 🔆
agentmodel 1 9,998.70 8,550.08 16.94% 🔆
unet_fp16 2 57.87 58.85 -1.66%
resnet50v1_fp16 1 932.86 941.58 -0.93%
resnet50v1_int8 1 946.32 970.00 -2.44%
bert_base_cased_fp16 64 1,142.38 1,171.45 -2.48%
bert_large_uncased_fp16 32 351.83 363.62 -3.24% 🔴
bert_large_fp16 1 207.09 200.57 3.25% 🔆
distilgpt2_fp16 16 2,155.18 2,203.25 -2.18%
yolov5s 1 502.12 540.96 -7.18% 🔴
tinyllama 1 43.34 43.52 -0.41%
vicuna-fastchat 1 172.37 174.66 -1.31%
whisper-tiny-encoder 1 410.79 418.66 -1.88%
whisper-tiny-decoder 1 425.47 428.20 -0.64%

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

amdclang++/amdclang can be invoked without providing absolute path, since update-alternatives command has been run for these binaries
This will also help to remove the hard coded paths in cmake target files for these compilers
@causten causten changed the title SWDEV-451864 - Remove the hard coded path in MIGRAPHX_CXX_COMPILER Remove the hard coded path in MIGRAPHX_CXX_COMPILER Oct 8, 2024
@causten causten merged commit b3390a7 into ROCm:develop Oct 8, 2024
22 of 23 checks passed
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