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

[MIGraphX EP] Set external data path option #44

Merged
merged 3 commits into from
Jul 1, 2024

Conversation

stsokolo
Copy link

Set external data path before calling parse_onnx_buffer in case MIGraphX needs to read external data.

This change is needed in order for ORT Stable Diffusion pipeline (maybe some other models as well) to work with MIGraphX EP. It fails to compile unet model because it does not construct absolute path to the external file that is needed for compilation.
Note: This change depends on changes in AMDMIGraphX (PR: ROCm/AMDMIGraphX#3191)

@@ -100,6 +101,7 @@ class MIGraphXExecutionProvider : public IExecutionProvider {
migraphx::target t_;
OrtMutex mgx_mu_;
hipStream_t stream_ = nullptr;
mutable char model_path_[4096] = {}; // Reserved for max path length
Copy link

Choose a reason for hiding this comment

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

Please change it to std::filesystem::path or std::string. Your assumption about the max path needs to be corrected -NTFS can have paths up to 64K characters.

@apwojcik apwojcik merged commit c06c21c into rocm6.2_internal_testing Jul 1, 2024
8 of 10 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.

2 participants