-
Notifications
You must be signed in to change notification settings - Fork 87
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
Fix/missing miopen dll #2227
Fix/missing miopen dll #2227
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #2227 +/- ##
===========================================
+ Coverage 91.49% 91.51% +0.01%
===========================================
Files 427 427
Lines 15953 15972 +19
===========================================
+ Hits 14596 14616 +20
+ Misses 1357 1356 -1
|
48dba1a
to
1bc5bfc
Compare
1bc5bfc
to
c0ddcfc
Compare
This build is not recommended to merge 🔴 |
🔴torchvision-inceptionv3_1: FAILED: MIGraphX is not within tolerance - check verbose output🔴cadene-dpn92_1: FAILED: MIGraphX is not within tolerance - check verbose output🔴slim-inceptionv4_1: FAILED: MIGraphX is not within tolerance - check verbose output |
Why do we need this for MIOpen and not for rocblas or hip? Why doesn't setting the Also, MIOpen uses extra files(like perfdb, finddb, kerneldb, etc) which wont be used if we copy it our build directory. |
UIF is a single team porting MIOpen and MIGraphX (and dependencies) to Windows. Therefore, there is no specific revision (commit) of MIOpen we base development of MIGraphX. |
I think this makes sense, since it looks like you've also contained your changes under IF(WIN32) block and shouldn't break existing builds that we use on *Nix right now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PATH will not work because there are several builds of MIOpen we want to test against MIGraphX without vast reconfiguration of the whole environment.
I dont understand why you need a vast reconfiguration. You just need to run with the new path:
cmake -E env PATH=$MIOPEN_PATH;$PATH cmake --build . --config Debug --target check
You could also have a script you can run to copy MIOpen over from the version you want and then you dont need to reconfigure anything or run the build from the command-line.
Rebuilding migraphx to use a different MIOpen seems to require more reconfiguration.
This also seems like a hack very specific to your workflow and is not something we want external users to use when we build for windows, especially since MIOpen will not be performant due to missing DB files and kernel caches.
I dont think this should be merged in.
We are almost not using the command line in favor of IDEs for development. However, that requires support in CMakes to facilitate work with IDEs. The CMake team knows that and offers tooling to help developers work with IDEs. In this PR, we used one of the tools provided by the CMake team to make working with Visual Studio much easier.
That will not work when we generate Visual Studio project files. It has to be part of CMakeLists.txt to correctly generate post-build steps for the project. Access to MIOpen is required to use the built-in debugger from Visual Studio IDE. So, doing this via script will make it even more complicated. Ultimately, we must add the call to the script as a post-build step. It is much better to do it in CMake natively. |
It is not standard practice to copy dependencies artifcats into the build directory. Plus, messing with MIOpen's installation files can bring lots of problems and tightly couples the migraphx and miopen version. So we dont want to have that in our cmake build scripts. It should be done outside of the CMakeLists.txt.
This is really a false dichotomy. You should use both to get the best programmer productivity.
Why?
I dont see why this should be a post-build step. You just need to run the copy before you run the test executable. No need for any rebuilds whatsoever.
Sure thats why you have a script to copy it or set the
I dont see how calling a script before launching the debugger is complicated Although setting the |
We are trying to do standard methods to solve this problem. PyTorch provides an example. Another problem that can crop up from path manipulation is the reason PyTorch made this change in the first place related to Windows finding the wrong DLL's here. PyTorch does use MSVC instead of WIN32 which is a change I think we should consider.
Agreed, but we should also not neglect IDE's and provide a good experience for them as well.
It's a little hacky when you need to write custom scripts or do manual steps just to get debugging working. Ideally, we have a solution that works great with command line and IDE's that is industry standard for how to solve this problem on Windows. Modifying the launch.json may help this issue and we can definitely get it to work but it is not a great experience for easier developer workflows on Windows similar to what PyTorch provided. Hopefully I made a convincing argument. If it is still a problem, we will pull the change and create a Python script or something to do the build/copy in a single step. |
I should clarify that we won't add anything to the repo for this. We'll just have manual steps, launch.json, environment variables, or scripts to solve the developer problem locally. |
Thats not an example of good practice in cmake: modifying MIOpen defines its installation with
The ability to modify configurations like launch.json or write custom scripts is not a sign of a "hacky" approach. It's a testament to the flexibility and extensibility of many modern development environments.
Tightly coupling the versions between miopen and migraphx is not a great solution. |
Understood, we'll pull the change and stick with developers configuring their environment. |
Fixed
test_gpu_*
issue:Exit code 0xc0000135
which is caused by missing MIOpen.dll inside AMDMIGraphX/build/bin directory. Added inside src/targets/gpu/CMakeLists.txt MIOpen.dll copy to appropriate directory (in Windows case). This solution fixed MIGraphX test issue which appeared in the following tests: