Skip to content

Commit

Permalink
Merge branch 'develop' into pooling_uint8_error
Browse files Browse the repository at this point in the history
  • Loading branch information
nives-vukovic authored Apr 25, 2024
2 parents 9f5d573 + ee68f72 commit 2caa6aa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
8 changes: 4 additions & 4 deletions src/propagate_constant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ void propagate_constant::apply(module& m) const
// Compute literals in parallel
std::vector<instruction_ref> const_instrs_vec{const_instrs.begin(), const_instrs.end()};
std::vector<argument> literals(const_instrs_vec.size());
std::size_t n = 1;
std::size_t grainsize = 1;
#if !MIGRAPHX_HAS_EXECUTORS
n = std::max<std::size_t>(
std::ceil(static_cast<double>(1024) / std::thread::hardware_concurrency()), 1);
std::size_t n = std::max<std::size_t>(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();
});

Expand Down
13 changes: 7 additions & 6 deletions tools/docker/migraphx_with_onnxruntime_pytorch.docker
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand Down

0 comments on commit 2caa6aa

Please sign in to comment.