mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-11-18 19:43:00 +03:00
Remove migraphx detector type
This commit is contained in:
@@ -1,36 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.1)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE Release)
|
||||
endif()
|
||||
|
||||
project(migraphx_py)
|
||||
|
||||
find_package(pybind11 REQUIRED)
|
||||
pybind11_add_module(migraphx_py migraphx_py.cpp)
|
||||
|
||||
include_directories(
|
||||
/opt/rocm/include
|
||||
/opt/rocm/lib/migraphx/include
|
||||
)
|
||||
|
||||
target_link_directories(migraphx_py PRIVATE
|
||||
"/opt/rocm/lib"
|
||||
"/opt/rocm/lib/migraphx/lib"
|
||||
)
|
||||
target_link_libraries(migraphx_py PRIVATE
|
||||
migraphx
|
||||
migraphx_tf
|
||||
migraphx_onnx
|
||||
)
|
||||
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
|
||||
|
||||
set_target_properties(migraphx_py PROPERTIES OUTPUT_NAME "migraphx")
|
||||
install(TARGETS migraphx_py
|
||||
COMPONENT python
|
||||
LIBRARY DESTINATION lib
|
||||
)
|
||||
@@ -58,8 +58,6 @@ RUN cd /opt/rocm-$ROCM/lib && cp -dpr \
|
||||
migraphx \
|
||||
# NOTE: Include rocRoller library (only ROCm 7.0+)
|
||||
librocroller*.so* \
|
||||
# NOTE: Include libdnnl for migraphx CPU device type support
|
||||
libdnnl*.so* \
|
||||
/opt/rocm-dist/opt/rocm-$ROCM/lib/
|
||||
|
||||
# Copy ROCm HIP include (only ROCm 7.2+)
|
||||
@@ -76,18 +74,6 @@ RUN mkdir -p /opt/rocm-dist/etc/ld.so.conf.d/
|
||||
RUN printf "/opt/rocm/lib\n/opt/rocm/lib/migraphx/lib" | tee /opt/rocm-dist/etc/ld.so.conf.d/rocm.conf
|
||||
RUN printf "/usr/lib/llvm-14/lib" | tee /opt/rocm-dist/etc/ld.so.conf.d/llvm.conf
|
||||
|
||||
# Build migraphx python bindings for our python version
|
||||
# NOTE: AMDMIGraphX repo does not contain a tag for all ROCm versions, hence the fallback to lower patch versions
|
||||
WORKDIR /tmp/migraphx_py
|
||||
RUN apt install -qq -y --no-install-recommends g++ python3-dev python3-pybind11 cmake make
|
||||
COPY docker/rocm/CMakeLists.txt .
|
||||
RUN for i in 0 1 2; do \
|
||||
VERSION=$(echo $ROCM | awk -F. -v d=$i '{OFS="."; $3-=d; print}') && \
|
||||
wget https://raw.githubusercontent.com/ROCm/AMDMIGraphX/refs/tags/rocm-$VERSION/src/py/migraphx_py.cpp && break; \
|
||||
done
|
||||
RUN cmake . -DCMAKE_INSTALL_PREFIX=/opt/rocm-dist/opt/rocm-$ROCM && \
|
||||
make install
|
||||
|
||||
#######################################################################
|
||||
FROM deps AS deps-prelim
|
||||
|
||||
@@ -97,8 +83,6 @@ RUN apt update && \
|
||||
apt install -qq -y -t bookworm-backports mesa-va-drivers mesa-vulkan-drivers && \
|
||||
# Install C++ standard library headers for HIPRTC kernel compilation fallback
|
||||
apt install -qq -y libstdc++-12-dev libnuma1 && \
|
||||
# Install libomp for migraphx CPU device type support
|
||||
apt install -qq -y libomp-dev && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /opt/frigate
|
||||
|
||||
Reference in New Issue
Block a user