openppl / ppl.cv Goto Github PK
View Code? Open in Web Editor NEWppl.cv is a high-performance image processing library of openPPL supporting various platforms.
License: Apache License 2.0
ppl.cv is a high-performance image processing library of openPPL supporting various platforms.
License: Apache License 2.0
(base) PS D:\Deps\ppl.cv> build.bat -G "Visual Studio 16 2019" -A x64 -DPPLCV_USE_X86_64=ON
D:\Deps\ppl.cv>md pplcv-build
子目录或文件 pplcv-build 已经存在。
D:\Deps\ppl.cv>cd pplcv-build
D:\Deps\ppl.cv\pplcv-build>cmake -G "Visual Studio 16 2019" -A x64 -DPPLCV_USE_X86_64=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install ..
CMake Error: Error: generator platform: x64
Does not match the platform used previously:
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
D:\Deps\ppl.cv\pplcv-build>cmake --build . --config Release -- /m
CMake is re-running because D:/Deps/ppl.cv/pplcv-build/CMakeFiles/generate.stamp dependency file is missing.
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- Populating hpcc
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Deps/ppl.cv/deps/hpcc-subbuild
用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.11.2+f32259642
版权所有(C) Microsoft Corporation。保留所有权利。
Performing update step for 'hpcc-populate'
No patch step for 'hpcc-populate'
No configure step for 'hpcc-populate'
No build step for 'hpcc-populate'
No install step for 'hpcc-populate'
No test step for 'hpcc-populate'
Completed 'hpcc-populate'
-- Populating pplcommon
-- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
-- Configuring done
-- Generating done
-- Build files have been written to: D:/Deps/ppl.cv/deps/pplcommon-subbuild
用于 .NET Framework 的 Microsoft (R) 生成引擎版本 16.11.2+f32259642
版权所有(C) Microsoft Corporation。保留所有权利。
Performing update step for 'pplcommon-populate'
No patch step for 'pplcommon-populate'
No configure step for 'pplcommon-populate'
No build step for 'pplcommon-populate'
No install step for 'pplcommon-populate'
No test step for 'pplcommon-populate'
Completed 'pplcommon-populate'
CMake Warning (dev) at D:/Program Files/CMake/share/cmake-3.25/Modules/FetchContent.cmake:1279 (message):
The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
not set. The policy's OLD behavior will be used. When using a URL
download, the timestamps of extracted files should preferably be that of
the time of extraction, otherwise code that depends on the extracted
contents might not be rebuilt if the URL changes. The OLD behavior
preserves the timestamps from the archive instead, but this is usually not
what you want. Update your project to the NEW behavior or specify the
DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
robustness issue.
Call Stack (most recent call first):
deps/hpcc/cmake/hpcc-common.cmake:79 (FetchContent_Declare)
deps/pplcommon/cmake/deps.cmake:61 (hpcc_declare_pkg_dep)
deps/pplcommon/CMakeLists.txt:4 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at D:/Program Files/CMake/share/cmake-3.25/Modules/FetchContent.cmake:1279 (message):
The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
not set. The policy's OLD behavior will be used. When using a URL
download, the timestamps of extracted files should preferably be that of
the time of extraction, otherwise code that depends on the extracted
contents might not be rebuilt if the URL changes. The OLD behavior
preserves the timestamps from the archive instead, but this is usually not
what you want. Update your project to the NEW behavior or specify the
DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
robustness issue.
Call Stack (most recent call first):
deps/hpcc/cmake/hpcc-common.cmake:79 (FetchContent_Declare)
deps/pplcommon/cmake/deps.cmake:82 (hpcc_declare_pkg_dep)
deps/pplcommon/CMakeLists.txt:4 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at D:/Program Files/CMake/share/cmake-3.25/Modules/FetchContent.cmake:1279 (message):
The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
not set. The policy's OLD behavior will be used. When using a URL
download, the timestamps of extracted files should preferably be that of
the time of extraction, otherwise code that depends on the extracted
contents might not be rebuilt if the URL changes. The OLD behavior
preserves the timestamps from the archive instead, but this is usually not
what you want. Update your project to the NEW behavior or specify the
DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
robustness issue.
Call Stack (most recent call first):
deps/hpcc/cmake/hpcc-common.cmake:79 (FetchContent_Declare)
deps/pplcommon/cmake/deps.cmake:103 (hpcc_declare_pkg_dep)
deps/pplcommon/CMakeLists.txt:4 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at D:/Program Files/CMake/share/cmake-3.25/Modules/FetchContent.cmake:1279 (message):
The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
not set. The policy's OLD behavior will be used. When using a URL
download, the timestamps of extracted files should preferably be that of
the time of extraction, otherwise code that depends on the extracted
contents might not be rebuilt if the URL changes. The OLD behavior
preserves the timestamps from the archive instead, but this is usually not
what you want. Update your project to the NEW behavior or specify the
DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
robustness issue.
Call Stack (most recent call first):
deps/hpcc/cmake/hpcc-common.cmake:79 (FetchContent_Declare)
deps/pplcommon/cmake/deps.cmake:124 (hpcc_declare_pkg_dep)
deps/pplcommon/CMakeLists.txt:4 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done
CMake Error at CMakeLists.txt:89 (add_library):
No SOURCES given to target: pplcv_static
CMake Generate step failed. Build files cannot be regenerated correctly.
D:\Deps\ppl.cv\pplcv-build>cmake --install . --config Release
CMake Error: Error processing file: D:/Deps/ppl.cv/pplcv-build/cmake_install.cmake
branch main
vs2019 v142
build.bat -G "Visual Studio 16 2019" -A x64 -DPPLCV_USE_X86_64=ON
Hi, ppl.cv developers
On arm64 platform, I benchmarked the resize()
related functions, and notice the prefetching boost the speed significantly.
What I'm confusing is, there are two wrapper functions, prefetch()
and prefetch_l1()
. Can they be merged into one? If not, what is the different of them?
inline void prefetch(const void *ptr, size_t offset = 32 * 10)
{
__builtin_prefetch(reinterpret_cast<const char *>(ptr) + offset);
}
and
inline void prefetch_l1(const void *ptr, size_t offset)
{
asm volatile(
"prfm pldl1keep, [%0, %1]\n\t"
:
: "r"(ptr), "r"(offset)
: "cc", "memory");
}
I read the GNU manual for __builtin_prefetch
, but still not sure: https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
Compiled with the latest commit:
commit 7111be49dd54cba44faa2bc6fbb46bff1b553517 (HEAD -> master, origin/master, origin/HEAD)
Author: ouguoyu <[email protected]>
Date: Sun Jan 16 20:30:28 2022 +0800
[fix] do not include opencv2/opencv2.hpp in unittest/benchmark
run the benchmark:
/home/zz/work/github/ppl.cv/deps/benchmark/src/benchmark_register.cc:313: Args: Check `ArgsCnt() == -1 || ArgsCnt() == static_cast<int>(args.size())' failed.
zsh: abort (core dumped) ./pplcv_benchmark
my environment:
Linux x64
Support for resize bilinear?
请问如果显卡配置还可以,那么cuda和simd指令集加速,这两种方法,哪个算子运算的效率会更好?
请不必考虑硬件配置的差异,假设它的显卡和CPU都很高端,纯粹从理论上分析和比较这两种方法。
./build.bat -G "Visual Studio 16 2019" -A x64 -DHPCC_USE_X86_64=ON -DHPCC_USE_CUDA=ON -DPPLCV_BUILD_TESTS=OFF -DPPLCV_BUILD_BENCHMARK=OFF
windows visual studio2019 编译 只生成了pplcommon_static.lib
main branch
windows
vs2019 amd 64
./build.bat -G "Visual Studio 16 2019" -A x64 -DHPCC_USE_X86_64=ON -DHPCC_USE_CUDA=ON -DPPLCV_BUILD_TESTS=OFF -DPPLCV_BUILD_BENCHMARK=OFF
There are many scenarios in actual projects that require WarpPerspective acceleration
@ouonline Is there any plan that ppl.cv also generate doxygen documentations like ppl.nn does?
use ppl::cv::cuda::Resize<uchar, 3> to resize
INPUT:
[[[0, 0, 0]], [[1, 0, 0]], [[1, 0, 0]]], uchar, src_stride == 9
to
(224,224) dst_stride == 3*224
result :
RC_DEVICE_RUNTIME_ERROR (an illegal memory access was encountered)
master
my own fault
the op of aarch64 is less than others platform
src/ppl/cv/cuda/warp.hpp 第275行
线程调用transform.calculateCoordinates会改变一个transform实例内的x,y值。如果多个线程同时调用,他们操作的transoform实例属于同一个,我想这里是否需要考虑线程安全的问题?
template <typename Transform>
__global__
void warpLinearKernel(const uchar* src, int src_rows, int src_cols,
int channels, int src_stride, Transform transform,
uchar* dst, int dst_rows, int dst_cols, int dst_stride,
BorderType border_type, uchar border_value) {
int element_x = (blockIdx.x << kBlockShiftX0) + threadIdx.x;
int element_y = (blockIdx.y << kBlockShiftY0) + threadIdx.y;
if (element_x >= dst_cols || element_y >= dst_rows) {
return;
}
transform.calculateCoordinates(element_x, element_y);
float src_x = transform.getX();
float src_y = transform.getY();
I encountered error results when using non-blocking streams. In our high concurrency service, the probability of error occurrence is approximately one in ten thousand.
https://github.com/openppl-public/ppl.cv/blob/6f65a8d9e56aca1a58228e314472112363760392/src/ppl/cv/cuda/copymakeborder.cu#L364
The CUDA memory copy operation, cudaMemcpy, is not synchronized with the input stream. This issue does not arise when using regular streams but for non-blocking streams employed(Non-blocking streams do not synchronize with the legacy stream, and can be created using the cudaStreamNonBlocking flag with the stream creation APIs. ).
Non-blocking streams are widely used. For example, Pytorch use non-blocking stream by default:
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:65:27: error: argument value 4 is outside the valid range [0, 3]
t_right = vextq_f32(tcurr, tnext[0], nc);
^ ~~
/home/zz/soft/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/arm_neon.h:5846:25: note: expanded from macro 'vextq_f32'
__ret = (float32x4_t) __builtin_neon_vextq_v((int8x16_t)__s0, (int8x16_t)__s1, __p2, 41); \
^ ~~~~
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:327:13: note: in instantiation of function template specialization 'ppl::cv::aarch64::MorphRow<ppl::cv::aarch64::DilateVecOp, float, 4, 3>' requested here
MorphRow<morphOp, float, nc, kernel_len>(tprev, tcurr, tnext, srow + x, srcStride, drow, y, height - 1 - y, x - v_elem, width * nc - 1 - (x - v_elem), borderValue);
^
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:150:27: error: argument value 4 is outside the valid range [0, 3]
t_right = vextq_f32(tnext[0], t_last, nc);
^ ~~
/home/zz/soft/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/arm_neon.h:5846:25: note: expanded from macro 'vextq_f32'
__ret = (float32x4_t) __builtin_neon_vextq_v((int8x16_t)__s0, (int8x16_t)__s1, __p2, 41); \
^ ~~~~
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:330:9: note: in instantiation of function template specialization 'ppl::cv::aarch64::MorphRowLast<ppl::cv::aarch64::DilateVecOp, float, 4, 3>' requested here
MorphRowLast<morphOp, float, nc, kernel_len>(tprev, tcurr, tnext, srow + x, srcStride, drow, y, height - 1 - y, x - v_elem, width * nc - 1 - (x - v_elem), borderValue);
^
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:162:27: error: argument value 4 is outside the valid range [0, 3]
t_right = vextq_f32(t_last, v_border, nc);
^ ~~
/home/zz/soft/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/arm_neon.h:5846:25: note: expanded from macro 'vextq_f32'
__ret = (float32x4_t) __builtin_neon_vextq_v((int8x16_t)__s0, (int8x16_t)__s1, __p2, 41); \
^ ~~~~
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:65:27: error: argument value 4 is outside the valid range [0, 3]
t_right = vextq_f32(tcurr, tnext[0], nc);
^ ~~
/home/zz/soft/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/arm_neon.h:5846:25: note: expanded from macro 'vextq_f32'
__ret = (float32x4_t) __builtin_neon_vextq_v((int8x16_t)__s0, (int8x16_t)__s1, __p2, 41); \
^ ~~~~
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:327:13: note: in instantiation of function template specialization 'ppl::cv::aarch64::MorphRow<ppl::cv::aarch64::DilateVecOp, float, 4, 5>' requested here
MorphRow<morphOp, float, nc, kernel_len>(tprev, tcurr, tnext, srow + x, srcStride, drow, y, height - 1 - y, x - v_elem, width * nc - 1 - (x - v_elem), borderValue);
^
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:150:27: error: argument value 4 is outside the valid range [0, 3]
t_right = vextq_f32(tnext[0], t_last, nc);
^ ~~
/home/zz/soft/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/arm_neon.h:5846:25: note: expanded from macro 'vextq_f32'
__ret = (float32x4_t) __builtin_neon_vextq_v((int8x16_t)__s0, (int8x16_t)__s1, __p2, 41); \
^ ~~~~
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:330:9: note: in instantiation of function template specialization 'ppl::cv::aarch64::MorphRowLast<ppl::cv::aarch64::DilateVecOp, float, 4, 5>' requested here
MorphRowLast<morphOp, float, nc, kernel_len>(tprev, tcurr, tnext, srow + x, srcStride, drow, y, height - 1 - y, x - v_elem, width * nc - 1 - (x - v_elem), borderValue);
^
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:162:27: error: argument value 4 is outside the valid range [0, 3]
t_right = vextq_f32(t_last, v_border, nc);
^ ~~
/home/zz/soft/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/arm_neon.h:5846:25: note: expanded from macro 'vextq_f32'
__ret = (float32x4_t) __builtin_neon_vextq_v((int8x16_t)__s0, (int8x16_t)__s1, __p2, 41); \
^ ~~~~
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:65:27: error: argument value 4 is outside the valid range [0, 3]
t_right = vextq_f32(tcurr, tnext[0], nc);
^ ~~
/home/zz/soft/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/arm_neon.h:5846:25: note: expanded from macro 'vextq_f32'
__ret = (float32x4_t) __builtin_neon_vextq_v((int8x16_t)__s0, (int8x16_t)__s1, __p2, 41); \
^ ~~~~
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:327:13: note: in instantiation of function template specialization 'ppl::cv::aarch64::MorphRow<ppl::cv::aarch64::ErodeVecOp, float, 4, 3>' requested here
MorphRow<morphOp, float, nc, kernel_len>(tprev, tcurr, tnext, srow + x, srcStride, drow, y, height - 1 - y, x - v_elem, width * nc - 1 - (x - v_elem), borderValue);
^
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:150:27: error: argument value 4 is outside the valid range [0, 3]
t_right = vextq_f32(tnext[0], t_last, nc);
^ ~~
/home/zz/soft/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/arm_neon.h:5846:25: note: expanded from macro 'vextq_f32'
__ret = (float32x4_t) __builtin_neon_vextq_v((int8x16_t)__s0, (int8x16_t)__s1, __p2, 41); \
^ ~~~~
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:330:9: note: in instantiation of function template specialization 'ppl::cv::aarch64::MorphRowLast<ppl::cv::aarch64::ErodeVecOp, float, 4, 3>' requested here
MorphRowLast<morphOp, float, nc, kernel_len>(tprev, tcurr, tnext, srow + x, srcStride, drow, y, height - 1 - y, x - v_elem, width * nc - 1 - (x - v_elem), borderValue);
^
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:162:27: error: argument value 4 is outside the valid range [0, 3]
t_right = vextq_f32(t_last, v_border, nc);
^ ~~
/home/zz/soft/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/arm_neon.h:5846:25: note: expanded from macro 'vextq_f32'
__ret = (float32x4_t) __builtin_neon_vextq_v((int8x16_t)__s0, (int8x16_t)__s1, __p2, 41); \
^ ~~~~
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:65:27: error: argument value 4 is outside the valid range [0, 3]
t_right = vextq_f32(tcurr, tnext[0], nc);
^ ~~
/home/zz/soft/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/arm_neon.h:5846:25: note: expanded from macro 'vextq_f32'
__ret = (float32x4_t) __builtin_neon_vextq_v((int8x16_t)__s0, (int8x16_t)__s1, __p2, 41); \
^ ~~~~
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:327:13: note: in instantiation of function template specialization 'ppl::cv::aarch64::MorphRow<ppl::cv::aarch64::ErodeVecOp, float, 4, 5>' requested here
MorphRow<morphOp, float, nc, kernel_len>(tprev, tcurr, tnext, srow + x, srcStride, drow, y, height - 1 - y, x - v_elem, width * nc - 1 - (x - v_elem), borderValue);
^
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:150:27: error: argument value 4 is outside the valid range [0, 3]
t_right = vextq_f32(tnext[0], t_last, nc);
^ ~~
/home/zz/soft/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/arm_neon.h:5846:25: note: expanded from macro 'vextq_f32'
__ret = (float32x4_t) __builtin_neon_vextq_v((int8x16_t)__s0, (int8x16_t)__s1, __p2, 41); \
^ ~~~~
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:330:9: note: in instantiation of function template specialization 'ppl::cv::aarch64::MorphRowLast<ppl::cv::aarch64::ErodeVecOp, float, 4, 5>' requested here
MorphRowLast<morphOp, float, nc, kernel_len>(tprev, tcurr, tnext, srow + x, srcStride, drow, y, height - 1 - y, x - v_elem, width * nc - 1 - (x - v_elem), borderValue);
^
/home/zz/work/github/ppl.cv/src/ppl/cv/aarch64/morph_f32.cpp:162:27: error: argument value 4 is outside the valid range [0, 3]
t_right = vextq_f32(t_last, v_border, nc);
^ ~~
/home/zz/soft/android-ndk-r21b/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/9.0.8/include/arm_neon.h:5846:25: note: expanded from macro 'vextq_f32'
__ret = (float32x4_t) __builtin_neon_vextq_v((int8x16_t)__s0, (int8x16_t)__s1, __p2, 41); \
^ ~~~~
12 errors generated.
make[2]: *** [CMakeFiles/pplcv_static.dir/build.make:272:CMakeFiles/pplcv_static.dir/src/ppl/cv/aarch64/morph_f32.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:2269:CMakeFiles/pplcv_static.dir/all] 错误 2
make: *** [Makefile:156:all] 错误 2
Create build/android-arm64-build.sh script with contents:
#!/bin/bash
ANDROID_NDK=~/soft/android-ndk-r21b
TOOLCHAIN=$ANDROID_NDK/build/cmake/android.toolchain.cmake
BUILD_DIR=android-arm64
mkdir -p $BUILD_DIR
cd $BUILD_DIR
#-G Ninja # fail
cmake \
-DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN \
-DANDROID_LD=lld \
-DANDROID_ABI="arm64-v8a" \
-DANDROID_PLATFORM=android-24 \
-DCMAKE_BUILD_TYPE=Release \
-DHPCC_USE_AARCH64=ON \
../..
#ninja
#cmake --build . --verbose
cmake --build .
cd ..
m1 aarch64
Thanks for your amazing tools. I'm starting to try to build opencl version. In ocl_usage.md
, DPPLCV_OPENCL_LIBRARIES
is set to
/opt/toolchains/android-toolchain-aarch64/lib64/OpenCL/qualcomm/libOpenCL.so
. But I'm not sure where this toolchain comes from.
master branch
windows 11
Visual Studio 16 2019 Win64
build.bat -G "Visual Studio 16 2019 Win64" -DPPLCV_USE_X86_64=ON
build.bat -G "Visual Studio 16 2019 Win64" -DPPLCV_USE_X86_64=ON
MMDeploy inference SDK failed to perform swin-transform inference on CUDA platform because ppl.cv doesn't support 'bicubic' resize
We have integrated some of the functions from ppl.cv into torch, which are very useful. It would be even nice if the official could provide one.
https://github.com/torchpipe/torchpipe/blob/cb29b65e9f90a43d4701bc1d3a95018a92b86b87/torchpipe/csrc/ppl.cv/src/PPLWarpAffineTensor.cpp#L59
1145 行
for (int32_t i = 0; i < outHeight; i += BLOCK_SIZE) {
size_t blockHeight = std::min<size_t>(BLOCK_SIZE, inHeight - i);
for (int32_t j = 0; j < outWidth; j += BLOCK_SIZE) {
size_t blockWidth = std::min<size_t>(BLOCK_SIZE, inWidth - j);
需要改为
for (int32_t i = 0; i < outHeight; i += BLOCK_SIZE) {
size_t blockHeight = std::min<size_t>(BLOCK_SIZE, **outHeight** - i);
for (int32_t j = 0; j < outWidth; j += BLOCK_SIZE) {
size_t blockWidth = std::min<size_t>(BLOCK_SIZE, **outWidth** - j);
ppl.cv/src/ppl/cv/cuda/resize.cu(32): error: texture is not a template
ppl.cv/src/ppl/cv/cuda/resize.cu(34): error: texture is not a template
ppl.cv/src/ppl/cv/cuda/resize.cu(36): error: texture is not a template
ppl.cv/src/ppl/cv/cuda/resize.cu(126): error: no instance of overloaded function "tex2D" matches the argument list argument types are: (<error-type>, float, float)
ppl.cv/src/ppl/cv/cuda/resize.cu(133): error: no instance of overloaded function "tex2D" matches the argument list argument types are: (<error-type>, float, float)
ppl.cv/src/ppl/cv/cuda/resize.cu(158): error: no instance of overloaded function "tex2D" matches the argument list argument types are: (<error-type>, float, float)
ppl.cv/src/ppl/cv/cuda/resize.cu(767): error: no instance of overloaded function "tex2D" matches the argument list argument types are: (<error-type>, float, float)
ppl.cv/src/ppl/cv/cuda/resize.cu(774): error: no instance of overloaded function "tex2D" matches the argument list argument types are: (<error-type>, float, float)
ppl.cv/src/ppl/cv/cuda/resize.cu(808): error: no instance of overloaded function "tex2D" matches the argument list argument types are: (<error-type>, float, float)
ppl.cv/src/ppl/cv/cuda/resize.cu(1069): error: identifier "cudaBindTexture2D" is undefined
ppl.cv/src/ppl/cv/cuda/resize.cu(1085): error: identifier "cudaBindTexture2D" is undefined
ppl.cv/src/ppl/cv/cuda/resize.cu(1162): error: identifier "cudaBindTexture2D" is undefined
ppl.cv/src/ppl/cv/cuda/resize.cu(1179): error: identifier "cudaBindTexture2D" is undefined
ppl.cv/src/ppl/cv/cuda/resize.cu(1264): error: identifier "cudaBindTexture2D" is undefined
ppl.cv/src/ppl/cv/cuda/resize.cu(1341): error: identifier "cudaBindTexture2D" is undefined
latest
Ubuntu 20.04
gcc 9.4.0
./build.sh cuda
Seems like there needs to updates for CUDA 12. Will there be support for it soon?
看了arm的代码,似乎都是用的单线程跑的,请问一下有没有多线程?如何指定线程数?
Is there any plan to support qualcomm hexagon dsp ?
thanks
[ 98%] Building CUDA object CMakeFiles/pplcv_static.dir/src/ppl/cv/cuda/transpose.cu.o
/src/ppl/cv/cuda/warp.hpp(25): error: texture is not a template
static texture<uchar, 0x02,
^
/ppl.cv/src/ppl/cv/cuda/warp.hpp(27): error: texture is not a template
static texture<uchar4, 0x02,
^
ppl.cv/src/ppl/cv/cuda/warp.hpp(29): error: texture is not a template
static texture<float, 0x02,
^
/ppl.cv/src/ppl/cv/cuda/warp.hpp(31): error: texture is not a template
static texture<float4, 0x02,
^
/ppl.cv/src/ppl/cv/cuda/warp.hpp(72): error: no instance of overloaded function "tex2D" matches the argument list
argument types are: (, float, float)
float value = tex2D(uchar_c1_ref, src_x + 0.5f, src_y + 0.5f);
#16 42.54 [ 86%] Building CUDA object CMakeFiles/pplcv_static.dir/src/ppl/cv/cuda/sepfilter2d.cu.o
#16 42.72 /opt/ppl.cv/src/ppl/cv/cuda/norm.hpp(687): warning #173-D: floating-point value does not fit in required integral type
#16 42.72 partial_mins[threadIdx_x] = 3.40282346638528859811704183484516925e+38F;
#16 42.72 ^
#16 42.72 detected during instantiation of "void ppl::cv::cuda::MinMaxKernel(const Tsrc *, int, int, int, int, const ppl::cv::cuda::uchar *, int, int, Tdst *) [with Tsrc=ppl::cv::cuda::uchar, Tdst=long long]" at line 207 of /opt/ppl.cv/src/ppl/cv/cuda/normalize.cu
#16 42.72
#16 42.72 Remark: The warnings can be suppressed with "-diag-suppress "
#16 42.72
#16 42.72 /opt/ppl.cv/src/ppl/cv/cuda/norm.hpp(832): warning #173-D: floating-point value does not fit in required integral type
#16 42.72 partial_mins[threadIdx_x] = 3.40282346638528859811704183484516925e+38F;
#16 42.72 ^
#16 42.72 detected during instantiation of "void ppl::cv::cuda::MinMaxKernel(const Tsrc *, int, int, int, int, const ppl::cv::cuda::uchar *, int, int, Tdst *) [with Tsrc=ppl::cv::cuda::uchar, Tdst=long long]" at line 207 of /opt/ppl.cv/src/ppl/cv/cuda/normalize.cu
#16 42.72
#16 42.77 /opt/ppl.cv/src/ppl/cv/cuda/resize.cu(32): error: texture is not a template
#16 42.77 static texture<uchar, 0x02,
#16 42.77 ^
#16 42.77
#16 42.77 /opt/ppl.cv/src/ppl/cv/cuda/resize.cu(34): error: texture is not a template
#16 42.77 static texture<uchar4, 0x02,
#16 42.77 ^
#16 42.77
#16 42.77 /opt/ppl.cv/src/ppl/cv/cuda/resize.cu(36): error: texture is not a template
#16 42.77 static texture<float, 0x02,
#16 42.77 ^
#16 42.77
#16 42.77 /opt/ppl.cv/src/ppl/cv/cuda/resize.cu(126): error: no instance of overloaded function "tex2D" matches the argument list
#16 42.77 argument types are: (, float, float)
#16 42.77 float value = tex2D(uchar_c1_ref, coordinate_x, coordinate_y);
#16 42.77 ^
#16 42.77
#16 42.77 /opt/ppl.cv/src/ppl/cv/cuda/resize.cu(133): error: no instance of overloaded function "tex2D" matches the argument list
#16 42.77 argument types are: (, float, float)
#16 42.77 float4 value = tex2D(uchar_c4_ref, coordinate_x, coordinate_y);
#16 42.77 ^
#16 42.77
#16 42.77 /opt/ppl.cv/src/ppl/cv/cuda/resize.cu(158): error: no instance of overloaded function "tex2D" matches the argument list
#16 42.77 argument types are: (, float, float)
#16 42.77 float value = tex2D(float_c1_ref, coordinate_x, coordinate_y);
#16 42.77 ^
#16 42.77
#16 42.78 /opt/ppl.cv/src/ppl/cv/cuda/resize.cu(767): error: no instance of overloaded function "tex2D" matches the argument list
#16 42.78 argument types are: (, float, float)
#16 42.78 float value = tex2D(uchar_c1_ref, float_x, float_y);
#16 42.78 ^
#16 42.78
#16 42.78 /opt/ppl.cv/src/ppl/cv/cuda/resize.cu(774): error: no instance of overloaded function "tex2D" matches the argument list
#16 42.78 argument types are: (, float, float)
#16 42.78 float4 value = tex2D(uchar_c4_ref, float_x, float_y);
#16 42.78 ^
#16 42.78
#16 42.78 /opt/ppl.cv/src/ppl/cv/cuda/resize.cu(808): error: no instance of overloaded function "tex2D" matches the argument list
#16 42.78 argument types are: (, float, float)
#16 42.78 float value = tex2D(float_c1_ref, float_x, float_y);
#16 42.78 ^
#16 42.78
#16 42.79 /opt/ppl.cv/src/ppl/cv/cuda/resize.cu(1069): error: identifier "cudaBindTexture2D" is undefined
#16 42.79 code = cudaBindTexture2D(0, uchar_c1_ref, src, desc, src_cols, src_rows,
#16 42.79 ^
#16 42.79
#16 42.79 /opt/ppl.cv/src/ppl/cv/cuda/resize.cu(1085): error: identifier "cudaBindTexture2D" is undefined
#16 42.79 code = cudaBindTexture2D(0, uchar_c4_ref, src, desc, src_cols, src_rows,
#16 42.79 ^
#16 42.79
#16 42.79 /opt/ppl.cv/src/ppl/cv/cuda/resize.cu(1162): error: identifier "cudaBindTexture2D" is undefined
#16 42.79 code = cudaBindTexture2D(0, uchar_c1_ref, src, desc, src_cols, src_rows,
#16 42.79 ^
#16 42.79
#16 42.79 /opt/ppl.cv/src/ppl/cv/cuda/resize.cu(1179): error: identifier "cudaBindTexture2D" is undefined
#16 42.79 code = cudaBindTexture2D(0, uchar_c4_ref, src, desc, src_cols, src_rows,
#16 42.79 ^
#16 42.79
#16 42.80 /opt/ppl.cv/src/ppl/cv/cuda/resize.cu(1264): error: identifier "cudaBindTexture2D" is undefined
#16 42.80 code = cudaBindTexture2D(0, float_c1_ref, src, desc, src_cols, src_rows,
#16 42.80 ^
#16 42.80
#16 42.80 /opt/ppl.cv/src/ppl/cv/cuda/resize.cu(1341): error: identifier "cudaBindTexture2D" is undefined
#16 42.80 code = cudaBindTexture2D(0, float_c1_ref, src, desc, src_cols, src_rows,
#16 42.80 ^
#16 42.80
#16 42.81 15 errors detected in the compilation of "/opt/ppl.cv/src/ppl/cv/cuda/resize.cu".
#16 42.84 make[2]: *** [CMakeFiles/pplcv_static.dir/build.make:585: CMakeFiles/pplcv_static.dir/src/ppl/cv/cuda/resize.cu.o] Error 2
#16 42.84 make[2]: *** Waiting for unfinished jobs....
#16 44.18 /opt/ppl.cv/src/ppl/cv/cuda/norm.hpp(687): warning #173-D: floating-point value does not fit in required integral type
#16 44.18 partial_mins[threadIdx_x] = 3.40282346638528859811704183484516925e+38F;
[ 86%] Building CXX object CMakeFiles/pplcv_benchmark.dir/src/ppl/cv/x86/sobel_benchmark.cpp.o
/home/zz/work/github/ppl.cv/src/ppl/cv/x86/sobel_benchmark.cpp:166:85: error: member reference base type 'Tsrc *' is not a structure or union
iMat(height, width, CV_MAKETYPE(cv::DataType<Tsrc>::depth, channels), inData.get());
~~~~~~^~~~
/home/zz/work/github/ppl.cv/src/ppl/cv/x86/sobel_benchmark.cpp:167:86: error: member reference base type 'Tdst *' is not a structure or union
oMat(height, width, CV_MAKETYPE(cv::DataType<Tdst>::depth, channels), outData.get());
~~~~~~~^~~~
2 errors generated.
make[2]: *** [CMakeFiles/pplcv_benchmark.dir/build.make:608:CMakeFiles/pplcv_benchmark.dir/src/ppl/cv/x86/sobel_benchmark.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:1994:CMakeFiles/pplcv_benchmark.dir/all] 错误 2
make: *** [Makefile:156:all] 错误 2
$ uname -a
Linux arcsoft-43 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ cat /etc/issue
Ubuntu 20.04.2 LTS \n \l
$ echo $CC
clang
$ echo $CXX
clang++
$ clang --version
Ubuntu clang version 14.0.0-++20211207052700+51dc466642c5-1~exp1~20211207173249.80
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
commit 7111be49dd54cba44faa2bc6fbb46bff1b553517 (HEAD -> master, origin/master, origin/HEAD)
Author: ouguoyu <[email protected]>
Date: Sun Jan 16 20:30:28 2022 +0800
[fix] do not include opencv2/opencv2.hpp in unittest/benchmark
create build/linux-x64.sh
and execute it :
#!/bin/bash
BUILD_DIR=linux-x64
mkdir -p $BUILD_DIR
cd $BUILD_DIR
cmake ../.. \
-DHPCC_USE_X86_64=ON
cmake --build .
cd ..
(base) E:\ppl.cv\pplcv-build>"E:\CUDA11.2\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin\nvcc.exe" -gencode=arch=compute
_35,code=\"sm_35,compute_35\" -gencode=arch=compute_37,code=\"sm_37,compute_37\" -gencode=arch=compute_50,code=\"sm_5
0,compute_50\" -gencode=arch=compute_53,code=\"sm_53,compute_53\" -gencode=arch=compute_60,code=\"sm_60,compute_60\"
-gencode=arch=compute_61,code=\"sm_61,compute_61\" -gencode=arch=compute_70,code=\"sm_70,compute_70\" -gencode=arch=c
ompute_72,code=\"sm_72,compute_72\" -gencode=arch=compute_75,code=\"sm_75,compute_75\" -gencode=arch=compute_80,code=
\"sm_80,compute_80\" -gencode=arch=compute_86,code=\"sm_86,compute_86\" --use-local-env -ccbin "E:\Program Files (x86
)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64" -x cu -IE:\ppl.cv\include -IE:
\ppl.cv\src -I"E:\CUDA11.2\NVIDIA GPU Computing Toolkit\CUDA\v11.2\include" -IE:\ppl.cv\deps\pplcommon\src -I"E:\CUDA
11.2\NVIDIA GPU Computing Toolkit\CUDA\v11.2\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --com
pile -cudart static -Xcompiler="/EHsc /wd4819,/wd4828 -Ob2" -D_WINDOWS -DNDEBUG -DPPLCV_USE_CUDA -DPPLCV_VERSION_MA
JOR=0 -DPPLCV_VERSION_MINOR=7 -DPPLCV_VERSION_PATCH=0 -D"CMAKE_INTDIR=\"Release\"" -D_MBCS -DWIN32 -D_WINDOWS -DNDEBU
G -DPPLCV_USE_CUDA -DPPLCV_VERSION_MAJOR=0 -DPPLCV_VERSION_MINOR=7 -DPPLCV_VERSION_PATCH=0 -D"CMAKE_INTDIR=\"Release\
"" -Xcompiler "/EHsc /W3 /nologo /O2 /FdE:\ppl.cv\pplcv-build\Release\pplcv_static.pdb /FS /MD /GR" -o pplcv_static
.dir\Release\cvtcolor.obj "E:\ppl.cv\src\ppl\cv\cuda\cvtcolor.cu"
cl : 命令行 error D8003: 缺少源文件名 [E:\ppl.cv\pplcv-build\pplcv_static.vcxproj]
CUDACOMPILE : nvcc warning : The 'compute_35', 'compute_37', 'compute_50', 'sm_35', 'sm_37' and 'sm_50' architectures a
re deprecated, and may be removed in a future release (Use -Wno-deprecated-gpu-targets to suppress warning). [E:\ppl.cv
\pplcv-build\pplcv_static.vcxproj]
cvtcolor.cu
E:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\BuildCustomizations\CUDA 11.2.
targets(785,9): error MSB3721: 命令“"E:\CUDA11.2\NVIDIA GPU Computing Toolkit\CUDA\v11.2\bin\nvcc.exe" -gencode=arch=comp
ute_35,code=\"sm_35,compute_35\" -gencode=arch=compute_37,code=\"sm_37,compute_37\" -gencode=arch=compute_50,code=\"sm_
50,compute_50\" -gencode=arch=compute_53,code=\"sm_53,compute_53\" -gencode=arch=compute_60,code=\"sm_60,compute_60\" -
gencode=arch=compute_61,code=\"sm_61,compute_61\" -gencode=arch=compute_70,code=\"sm_70,compute_70\" -gencode=arch=comp
ute_72,code=\"sm_72,compute_72\" -gencode=arch=compute_75,code=\"sm_75,compute_75\" -gencode=arch=compute_80,code=\"sm_
80,compute_80\" -gencode=arch=compute_86,code=\"sm_86,compute_86\" --use-local-env -ccbin "E:\Program Files (x86)\Micro
soft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64" -x cu -IE:\ppl.cv\include -IE:\ppl.cv\s
rc -I"E:\CUDA11.2\NVIDIA GPU Computing Toolkit\CUDA\v11.2\include" -IE:\ppl.cv\deps\pplcommon\src -I"E:\CUDA11.2\NVIDIA
GPU Computing Toolkit\CUDA\v11.2\include" --keep-dir x64\Release -maxrregcount=0 --machine 64 --compile -cudart
static -Xcompiler="/EHsc /wd4819,/wd4828 -Ob2" -D_WINDOWS -DNDEBUG -DPPLCV_USE_CUDA -DPPLCV_VERSION_MAJOR=0 -DPPLCV_V
ERSION_MINOR=7 -DPPLCV_VERSION_PATCH=0 -D"CMAKE_INTDIR=\"Release\"" -D_MBCS -DWIN32 -D_WINDOWS -DNDEBUG -DPPLCV_USE_CUD
A -DPPLCV_VERSION_MAJOR=0 -DPPLCV_VERSION_MINOR=7 -DPPLCV_VERSION_PATCH=0 -D"CMAKE_INTDIR=\"Release\"" -Xcompiler "/EHs
c /W3 /nologo /O2 /FdE:\ppl.cv\pplcv-build\Release\pplcv_static.pdb /FS /MD /GR" -o pplcv_static.dir\Release\cvtcolor
.obj "E:\ppl.cv\src\ppl\cv\cuda\cvtcolor.cu"”已退出,返回代码为 2。 [E:\ppl.cv\pplcv-build\pplcv_static.vcxproj]
v0.7.0
windows11
cmake .. -G "Visual Studio 16 2019" -T v142 -A x64 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DHPCC_USE_CUDA=ON -DPPLCV_USE_MSVC_STATIC_RUNTIME=OFF
cmake --build . --config Release -- /m
请问这个项目的未来规划是什么?是把OpenCV已有的算子全部优化实现一遍吗?
什么时候实施canny和templatematch算子?
尤其是opencv的模板匹配templatematch算子比较弱。有无优化拓展(支持旋转,缩放)的计划?
[ 99%] Linking CXX executable bin/pplcv_benchmark
[ 99%] Building CXX object CMakeFiles/pplcv_unittest.dir/src/ppl/cv/x86/remap_unittest.cpp.o
/usr/bin/ld: libpplcv_static.a(arithmetic.cpp.o): in function `unsigned int ppl::cv::x86::Add<float, 1>(int, int, int, float const*, int, float const*, int, float*)':
arithmetic.cpp:(.text._ZN3ppl2cv3x863AddIfLi1EEEjiiiPKT_iS5_iPS3_[_ZN3ppl2cv3x863AddIfLi1EEEjiiiPKT_iS5_iPS3_]+0x1b8): undefined reference to `unsigned int ppl::cv::x86::fma::Add_fma<float, 1>(int, int, int, float const*, int, float const*, int, float*)'
/usr/bin/ld: libpplcv_static.a(arithmetic.cpp.o): in function `unsigned int ppl::cv::x86::Add<float, 3>(int, int, int, float const*, int, float const*, int, float*)':
arithmetic.cpp:(.text._ZN3ppl2cv3x863AddIfLi3EEEjiiiPKT_iS5_iPS3_[_ZN3ppl2cv3x863AddIfLi3EEEjiiiPKT_iS5_iPS3_]+0x1be): undefined reference to `unsigned int ppl::cv::x86::fma::Add_fma<float, 3>(int, int, int, float const*, int, float const*, int, float*)'
/usr/bin/ld: libpplcv_static.a(arithmetic.cpp.o): in function `unsigned int ppl::cv::x86::Add<float, 4>(int, int, int, float const*, int, float const*, int, float*)':
arithmetic.cpp:(.text._ZN3ppl2cv3x863AddIfLi4EEEjiiiPKT_iS5_iPS3_[_ZN3ppl2cv3x863AddIfLi4EEEjiiiPKT_iS5_iPS3_]+0x1be): undefined reference to `unsigned int ppl::cv::x86::fma::Add_fma<float, 4>(int, int, int, float const*, int, float const*, int, float*)'
/usr/bin/ld: libpplcv_static.a(arithmetic.cpp.o): in function `unsigned int ppl::cv::x86::Mul<float, 1>(int, int, int, float const*, int, float const*, int, float*, float)':
arithmetic.cpp:(.text._ZN3ppl2cv3x863MulIfLi1EEEjiiiPKT_iS5_iPS3_f[_ZN3ppl2cv3x863MulIfLi1EEEjiiiPKT_iS5_iPS3_f]+0x1ff): undefined reference to `unsigned int ppl::cv::x86::fma::Mul_fma<float, 1>(int, int, int, float const*, int, float const*, int, float*, float)'
/usr/bin/ld: libpplcv_static.a(arithmetic.cpp.o): in function `unsigned int ppl::cv::x86::Mul<float, 3>(int, int, int, float const*, int, float const*, int, float*, float)':
arithmetic.cpp:(.text._ZN3ppl2cv3x863MulIfLi3EEEjiiiPKT_iS5_iPS3_f[_ZN3ppl2cv3x863MulIfLi3EEEjiiiPKT_iS5_iPS3_f]+0x205): undefined reference to `unsigned int ppl::cv::x86::fma::Mul_fma<float, 3>(int, int, int, float const*, int, float const*, int, float*, float)'
/usr/bin/ld: libpplcv_static.a(arithmetic.cpp.o): in function `unsigned int ppl::cv::x86::Mul<float, 4>(int, int, int, float const*, int, float const*, int, float*, float)':
arithmetic.cpp:(.text._ZN3ppl2cv3x863MulIfLi4EEEjiiiPKT_iS5_iPS3_f[_ZN3ppl2cv3x863MulIfLi4EEEjiiiPKT_iS5_iPS3_f]+0x205): undefined reference to `unsigned int ppl::cv::x86::fma::Mul_fma<float, 4>(int, int, int, float const*, int, float const*, int, float*, float)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/pplcv_benchmark.dir/build.make:809:bin/pplcv_benchmark] 错误 1
make[1]: *** [CMakeFiles/Makefile2:1994:CMakeFiles/pplcv_benchmark.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
[ 99%] Building CXX object CMakeFiles/pplcv_unittest.dir/src/ppl/cv/x86/resize_unittest.cpp.o
[ 99%] Building CXX object CMakeFiles/pplcv_unittest.dir/src/ppl/cv/x86/rotate_unittest.cpp.o
[ 99%] Building CXX object CMakeFiles/pplcv_unittest.dir/src/ppl/cv/x86/setvalue_unittest.cpp.o
[ 99%] Building CXX object CMakeFiles/pplcv_unittest.dir/src/ppl/cv/x86/sobel_unittest.cpp.o
[100%] Building CXX object CMakeFiles/pplcv_unittest.dir/src/ppl/cv/x86/split_unittest.cpp.o
[100%] Building CXX object CMakeFiles/pplcv_unittest.dir/src/ppl/cv/x86/transpose_unittest.cpp.o
[100%] Building CXX object CMakeFiles/pplcv_unittest.dir/src/ppl/cv/x86/warpaffine_unittest.cpp.o
[100%] Building CXX object CMakeFiles/pplcv_unittest.dir/src/ppl/cv/x86/warpperspective_unittest.cpp.o
[100%] Linking CXX executable bin/pplcv_unittest
/usr/bin/ld: libpplcv_static.a(arithmetic.cpp.o): in function `unsigned int ppl::cv::x86::Add<float, 1>(int, int, int, float const*, int, float const*, int, float*)':
arithmetic.cpp:(.text._ZN3ppl2cv3x863AddIfLi1EEEjiiiPKT_iS5_iPS3_[_ZN3ppl2cv3x863AddIfLi1EEEjiiiPKT_iS5_iPS3_]+0x1b8): undefined reference to `unsigned int ppl::cv::x86::fma::Add_fma<float, 1>(int, int, int, float const*, int, float const*, int, float*)'
/usr/bin/ld: libpplcv_static.a(arithmetic.cpp.o): in function `unsigned int ppl::cv::x86::Add<float, 3>(int, int, int, float const*, int, float const*, int, float*)':
arithmetic.cpp:(.text._ZN3ppl2cv3x863AddIfLi3EEEjiiiPKT_iS5_iPS3_[_ZN3ppl2cv3x863AddIfLi3EEEjiiiPKT_iS5_iPS3_]+0x1be): undefined reference to `unsigned int ppl::cv::x86::fma::Add_fma<float, 3>(int, int, int, float const*, int, float const*, int, float*)'
/usr/bin/ld: libpplcv_static.a(arithmetic.cpp.o): in function `unsigned int ppl::cv::x86::Add<float, 4>(int, int, int, float const*, int, float const*, int, float*)':
arithmetic.cpp:(.text._ZN3ppl2cv3x863AddIfLi4EEEjiiiPKT_iS5_iPS3_[_ZN3ppl2cv3x863AddIfLi4EEEjiiiPKT_iS5_iPS3_]+0x1be): undefined reference to `unsigned int ppl::cv::x86::fma::Add_fma<float, 4>(int, int, int, float const*, int, float const*, int, float*)'
/usr/bin/ld: libpplcv_static.a(arithmetic.cpp.o): in function `unsigned int ppl::cv::x86::Mul<float, 1>(int, int, int, float const*, int, float const*, int, float*, float)':
arithmetic.cpp:(.text._ZN3ppl2cv3x863MulIfLi1EEEjiiiPKT_iS5_iPS3_f[_ZN3ppl2cv3x863MulIfLi1EEEjiiiPKT_iS5_iPS3_f]+0x1ff): undefined reference to `unsigned int ppl::cv::x86::fma::Mul_fma<float, 1>(int, int, int, float const*, int, float const*, int, float*, float)'
/usr/bin/ld: libpplcv_static.a(arithmetic.cpp.o): in function `unsigned int ppl::cv::x86::Mul<float, 3>(int, int, int, float const*, int, float const*, int, float*, float)':
arithmetic.cpp:(.text._ZN3ppl2cv3x863MulIfLi3EEEjiiiPKT_iS5_iPS3_f[_ZN3ppl2cv3x863MulIfLi3EEEjiiiPKT_iS5_iPS3_f]+0x205): undefined reference to `unsigned int ppl::cv::x86::fma::Mul_fma<float, 3>(int, int, int, float const*, int, float const*, int, float*, float)'
/usr/bin/ld: libpplcv_static.a(arithmetic.cpp.o): in function `unsigned int ppl::cv::x86::Mul<float, 4>(int, int, int, float const*, int, float const*, int, float*, float)':
arithmetic.cpp:(.text._ZN3ppl2cv3x863MulIfLi4EEEjiiiPKT_iS5_iPS3_f[_ZN3ppl2cv3x863MulIfLi4EEEjiiiPKT_iS5_iPS3_f]+0x205): undefined reference to `unsigned int ppl::cv::x86::fma::Mul_fma<float, 4>(int, int, int, float const*, int, float const*, int, float*, float)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/pplcv_unittest.dir/build.make:841:bin/pplcv_unittest] 错误 1
make[1]: *** [CMakeFiles/Makefile2:1954:CMakeFiles/pplcv_unittest.dir/all] 错误 2
make: *** [Makefile:156:all] 错误 2
same as #39 , only difference is:
unset CC
unset CXX
which will use GCC instead of Clang for compilation.
编译mmdeploy时报错:
/home/zcc/mmdeploy/csrc/net/ppl/ppl_net.cpp:77:89: error: no matching function for call to ‘ppl::nn::OnnxRuntimeBuilderFactory::Create(char*, std::__cxx11::basic_string::size_type, ppl::nn::Engine**, std::vectorppl::nn::Engine*::size_type)’
onnx.data(), onnx.size(), engines.data(), engines.size())));
^
^
Hi, when I link libpplcv_static.a to another dynamic lib, it says:
ImportError: /workspace/libxxx.so: undefined symbol: _ZN3ppl6common10LogMessageC1EjPNS0_6LoggerEPKcj
nm /workspace/libxxx.so |grep _ZN3ppl6common10LogMessageC1EjPNS0_6LoggerEPKcj
U _ZN3ppl6common10LogMessageC1EjPNS0_6LoggerEPKcj
nm /tmp/ppl.cv/./cuda-build/install/lib/libpplcommon_static.a |grep _ZN3ppl6common10LogMessageC1EjPNS0_6LoggerEPKcj
0000000000000000 T _ZN3ppl6common10LogMessageC1EjPNS0_6LoggerEPKcj
the source
if PPLCV_INSTALL:
include_dirs.append(os.path.join(PPLCV_INSTALL, "include"))
pplcv_lib_dir=os.path.join(PPLCV_INSTALL, "lib")
extra_link_args.append(f'-Wl,-rpath={pplcv_lib_dir}')
extra_link_args.append('-Wl,-Bsymbolic')
extra_link_args.append(os.path.join(pplcv_lib_dir,"libpplcv_static.a"))
ext_modules = [
extension(
"xxx.libxxx",
sorted(sources),
include_dirs=include_dirs,
define_macros=define_macros + image_macros,
extra_compile_args=extra_compile_args,
extra_link_args=extra_link_args + link_fs, # "-lstdc++fs"
library_dirs=["./lib", "/usr/local/lib/"] +[pplcv_lib_dir],
libraries=opencv_libs
+ thirdpart_libs
+ extra_lib,
)
]
麻烦问一下,roi_pooling
算子是否有支持计划
build enviroment:Nvidia-TX2,CUDA 10.0
nvcc fatal : redefinition of argument 'std'
windows vscode 编译 只生成了pplcommon_static.lib
main branch
windows
vs2019 amd 64
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=install -DHPCC_USE_CUDA=ON cmake --build . -j --config Release
Installed the pplcv following the tutorial, but find package was not found.
error message:
By not providing "Findpplcv.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "pplcv", but CMake did not find one.
Could not find a package configuration file provided by "pplcv" with any of the following names:
pplcvConfig.cmake
pplcv-config.cmake
add the installation prefix of "pplcv" to CMAKE_PREFIX_PATH or set "pplcv_DIR" to a directory containing one of the above files. If "pplcv" provides a separate development package or SDK, be sure it has been installed.
v0.6.2 and latest
ubuntu18.04
gcc7
mmdeploy
Hi, Openppl
I need to use op "remap" on aarch64. Could you provide this op.
Thanks.
i can use wget downloading this file, but cmake downloading fail,
--- LOG END ---
error: downloading 'https://github.com/openppl-public/hpcc/archive/800a280b41228df99a3d585d27b3fd962e780414.zip' failed
status_code: 1
status_string: "Unsupported protocol"
log:
--- LOG BEGIN ---
Protocol "https" not supported or disabled in libcurl
Closing connection -1
--- LOG END ---
error: downloading 'https://github.com/openppl-public/hpcc/archive/800a280b41228df99a3d585d27b3fd962e780414.zip' failed
status_code: 1
status_string: "Unsupported protocol"
log:
--- LOG BEGIN ---
Protocol "https" not supported or disabled in libcurl
Closing connection -1
The stream
argument is not passed to the following cudaMemcpyAsync
when handling trivial cases. Causing the copy to be performed on the default stream instead of the passed one.
https://github.com/openppl-public/ppl.cv/blob/eebdbd8ef1e831fa09079cf061752a8695b5dd02/src/ppl/cv/cuda/resize.cu#L1034-L1035
https://github.com/openppl-public/ppl.cv/blob/eebdbd8ef1e831fa09079cf061752a8695b5dd02/src/ppl/cv/cuda/resize.cu#L1228-L1229
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.