-
-
Notifications
You must be signed in to change notification settings - Fork 109
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
rocm support #16
Comments
Just added |
Building onnxruntime with rocm doesn't support making a shared library, so when I compile, it's giving me "/usr/bin/ld: cannot find -lonnxruntime: No such file or directory", even if I add to LD_LIBRARY_PATH. |
Is this an error when compiling |
ort |
Ah, when using |
Hm, looks like ort is compiling fine, but using it with your diffusers library is when it has the linking error, since there is no libonnxruntime.a either. |
Here's a list of files and directories the rocm version of onnxruntime produced: https://gist.github.com/45585c5f7bd797bbe9c6e3998edf0b34 |
Looks like I did not properly implement static linking with |
Now I'm getting error: could not compile |
sorry for the delay. Linking should be fixed with 2364c5d. |
I fixed the ort typo I mentioned last comment, which got ort compiling again, but I got https://gist.github.com/f0de93ba9fe3f0639a46d295b6f1e993 when compiling my program that uses your diffusers library. |
https://gist.github.com/d081fd8ecb2812aaa5fe1795129f183b I think it gave the same error but with the capital M this time |
@sonicrules1234 what branch of microsoft/onnxruntime is checked out, and would it be possible to share the contents of the build directory? |
Sorry it took so long to respond, I didn't see any email notification for this. Right now the files are on a somewhat corrupted partition. Once my pc is working properly again, I'll give this a try once more. |
Okay, got it back to where it was on a different install. I'm using the main branch of onnxruntime, and pulled it out of the docker build. |
|
Ok, it compiles and runs now, but doesn't seem to be using the gpu: |
Does it output anything when running with the environment variable |
Nope |
Add [dependencies]
tracing = "0.1"
tracing-subscriber = "0.3" to your Cargo.toml, and at the top of fn main() {
tracing_subscriber::fmt::init();
... then run again to see logs. |
It's spamming
That shared library file does exist at the root of ORT_LIB_LOCATION |
Try running with the env var |
Doesn't seem to make a difference |
Hello! I tried myself to run it, I have encountered the above error of
Which was fixed by adding it to FROM rocm/dev-ubuntu-22.04:5.6-complete
ARG ONNXRUNTIME_REPO=https://github.com/Microsoft/onnxruntime
ARG ONNXRUNTIME_BRANCH=main
WORKDIR /code
ENV PATH /opt/miniconda/bin:/code/cmake-3.26.3-linux-x86_64/bin:${PATH}
RUN git clone --single-branch --branch ${ONNXRUNTIME_BRANCH} --recursive ${ONNXRUNTIME_REPO} onnxruntime &&\
/bin/sh onnxruntime/dockerfiles/scripts/install_common_deps.sh &&\
cd onnxruntime &&\
/bin/sh ./build.sh --allow_running_as_root --config Release --update --build --parallel --cmake_extra_defines ONNXRUNTIME_VERSION=$(cat ./VERSION_NUMBER) --use_rocm --rocm_home=/opt/rocm \
# Modified from this point
--skip_submodule_sync --skip_tests --build_shared_lib &&\
cd build/Linux/Release/ &&\
make install
ENV ONNXRUNTIME_DIR="/code/onnxruntime/build/Linux/Release/"
ENV LD_LIBRARY_PATH=$ONNXRUNTIME_DIR:$LD_LIBRARY_PATH
# Next I copy and run a Rust application But now I get these logs:
It is running inside Docker. Perhaps this is because I'm using ROCm 5.6? EDIT: Just wasted 30 minutes, it doesn't work with ROCm 5.4 either. |
I'd be willing to help with the testing for this
The text was updated successfully, but these errors were encountered: