From 1b65c720105881f02386abdbd7e136f5c819edbc Mon Sep 17 00:00:00 2001 From: Ahsan Saghir <142340507+ahsan-ca@users.noreply.github.com> Date: Thu, 25 Apr 2024 10:21:04 -0400 Subject: [PATCH 1/2] Limit parallelism more conservatively (#2993) --- src/propagate_constant.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/propagate_constant.cpp b/src/propagate_constant.cpp index 6fffef1edaf..3a6856d9450 100644 --- a/src/propagate_constant.cpp +++ b/src/propagate_constant.cpp @@ -84,12 +84,12 @@ void propagate_constant::apply(module& m) const // Compute literals in parallel std::vector const_instrs_vec{const_instrs.begin(), const_instrs.end()}; std::vector literals(const_instrs_vec.size()); - std::size_t n = 1; + std::size_t grainsize = 1; #if !MIGRAPHX_HAS_EXECUTORS - n = std::max( - std::ceil(static_cast(1024) / std::thread::hardware_concurrency()), 1); + std::size_t n = std::max(2048 / std::thread::hardware_concurrency(), 1); + grainsize = const_instrs_vec.size() / n; #endif - simple_par_for(const_instrs_vec.size(), n, [&](const auto i) { + simple_par_for(const_instrs_vec.size(), grainsize, [&](const auto i) { literals[i] = const_instrs_vec[i]->eval(); }); From ee68f7261f264e90d2c6cdd51dec3c88e7a75e8f Mon Sep 17 00:00:00 2001 From: Ted Themistokleous <107195283+TedThemistokleous@users.noreply.github.com> Date: Thu, 25 Apr 2024 12:41:13 -0400 Subject: [PATCH 2/2] Update docker hub image script to support ROCm 6.1 build (#2998) --- .../docker/migraphx_with_onnxruntime_pytorch.docker | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tools/docker/migraphx_with_onnxruntime_pytorch.docker b/tools/docker/migraphx_with_onnxruntime_pytorch.docker index c4b630da3a0..6b1eb0c5c23 100644 --- a/tools/docker/migraphx_with_onnxruntime_pytorch.docker +++ b/tools/docker/migraphx_with_onnxruntime_pytorch.docker @@ -6,19 +6,20 @@ ARG PREFIX=/usr/local RUN apt update && apt install -y wget #Aquire and install ROCm -RUN wget https://repo.radeon.com/amdgpu-install/6.0.2/ubuntu/jammy/amdgpu-install_6.0.60002-1_all.deb -RUN apt install -y ./amdgpu-install_6.0.60002-1_all.deb -RUN amdgpu-install --usecase=rocm -y && rm amdgpu-install_6.0.60002-1_all.deb +RUN wget https://repo.radeon.com/amdgpu-install/6.1/ubuntu/jammy/amdgpu-install_6.1.60100-1_all.deb +RUN apt install -y ./amdgpu-install_6.1.60100-1_all.deb +RUN amdgpu-install --usecase=rocm -y && rm amdgpu-install_6.1.60100-1_all.deb #Install MIGraphX from package manager RUN apt install -y migraphx #Pieces for Onnxruntime for ROCm and MIGraphX Execution Provider Support -RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-6.0.2/onnxruntime_rocm-inference-1.17.0-cp310-cp310-linux_x86_64.whl +RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-6.1/onnxruntime_rocm-inference-1.17.0-cp310-cp310-linux_x86_64.whl #Pieces for pytorch -RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-6.0/torch-2.1.1+rocm6.0-cp310-cp310-linux_x86_64.whl -RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-6.0/torchvision-0.16.1+rocm6.0-cp310-cp310-linux_x86_64.whl +RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-6.1/pytorch_triton_rocm-2.1.0%2Brocm6.1.4d510c3a44-cp310-cp310-linux_x86_64.whl +RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-6.1/torch-2.1.2+rocm6.1-cp310-cp310-linux_x86_64.whl +RUN pip3 install https://repo.radeon.com/rocm/manylinux/rocm-rel-6.1/torchvision-0.16.1+rocm6.1-cp310-cp310-linux_x86_64.whl #Adjust final path for ability to use rocm components ENV PATH=$PATH:/opt/rocm/bin/