freebsd-ports/graphics/waifu2x-ncnn-vulkan/Makefile

44 lines
1.1 KiB
Makefile
Raw Normal View History

# $FreeBSD$
PORTNAME= waifu2x-ncnn-vulkan
DISTVERSION= 20200818
CATEGORIES= graphics
MAINTAINER= jbeich@FreeBSD.org
COMMENT= Scale and denoise images using convolutional neural networks
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
BUILD_DEPENDS= glslangValidator:devel/glslang \
graphics/waifu2x-ncnn-vulkan: back out r539374 ncnn API is not stable, updates frequently break this port. Binary is also smaller when using bundled ncnn. $ size $(which waifu2x-ncnn-vulkan) text data bss dec hex filename -7245567 242384 58992 7546943 73283f /usr/local/bin/waifu2x-ncnn-vulkan +3281223 3152 58840 3343215 33036f /usr/local/bin/waifu2x-ncnn-vulkan $ waifu2x-ncnn-vulkan -i foo.png -o bar.png [0 Intel(R) HD Graphics 530 (SKL GT2)] queueC=0[1] queueG=0[1] queueT=0[1] [0 Intel(R) HD Graphics 530 (SKL GT2)] bugsbn1=0 buglbia=0 bugcopc=0 bugihfa=0 [0 Intel(R) HD Graphics 530 (SKL GT2)] fp16p=1 fp16s=1 fp16a=1 int8s=1 int8a=1 pipeline specialization count mismatch, expect 4 but got 1 new_pipeline failed pipeline specialization count mismatch, expect 4 but got 1 new_pipeline failed Process 8606 stopped * thread #14, name = 'waifu2x-ncnn-vul', stop reason = signal SIGSEGV: invalid address (fault address: 0x28) frame #0: 0x0000000802080be9 libvulkan_intel.so`anv_CmdPushDescriptorSetWithTemplateKHR(commandBuffer=0x000000080c432800, descriptorUpdateTemplate=0x0000000000000000, _layout=0x0000000000000000, _set=0, pData=0x000000080c440140) at anv_cmd_buffer.c:1372:69 1369 1370 assert(_set < MAX_PUSH_DESCRIPTORS); 1371 -> 1372 struct anv_descriptor_set_layout *set_layout = layout->set[_set].layout; 1373 1374 struct anv_descriptor_set *set = 1375 anv_cmd_buffer_push_descriptor_set(cmd_buffer, template->bind_point, (lldb) bt * thread #14, name = 'waifu2x-ncnn-vul', stop reason = signal SIGSEGV: invalid address (fault address: 0x28) * frame #0: 0x0000000802080be9 libvulkan_intel.so`anv_CmdPushDescriptorSetWithTemplateKHR(commandBuffer=0x000000080c432800, descriptorUpdateTemplate=0x0000000000000000, _layout=0x0000000000000000, _set=0, pData=0x000000080c440140) at anv_cmd_buffer.c:1372:69 frame #1: 0x00000000004facce waifu2x-ncnn-vulkan`ncnn::VkCompute::record_pipeline(this=<unavailable>, pipeline=0x00000008045e3400, buffer_bindings=0x00007fffc35ea418, image_bindings=0x00007fffc35ea0f0, constants=0x00007fffc35ea400, dispatcher=0x00007fffc35ea110) at command.cpp:1457:13 frame #2: 0x00000000004f981c waifu2x-ncnn-vulkan`ncnn::VkCompute::record_pipeline(ncnn::Pipeline const*, std::__1::vector<ncnn::VkMat, std::__1::allocator<ncnn::VkMat> > const&, std::__1::vector<ncnn::vk_constant_type, std::__1::allocator<ncnn::vk_constant_type> > const&, ncnn::VkMat const&) [inlined] ncnn::VkCompute::record_pipeline(this=<unavailable>, pipeline=<unavailable>, buffer_bindings=<unavailable>, image_bindings=0x00007fffc35ea0f0, constants=<unavailable>, dispatcher=<unavailable>) at command.cpp:1187:5 frame #3: 0x00000000004f97bb waifu2x-ncnn-vulkan`ncnn::VkCompute::record_pipeline(this=<unavailable>, pipeline=<unavailable>, bindings=<unavailable>, constants=<unavailable>, dispatcher=<unavailable>) at command.cpp:1175 frame #4: 0x000000000086b516 waifu2x-ncnn-vulkan`Waifu2x::process(this=0x00007fffffffdd58, inimage=0x00007fffc35eaf30, outimage=0x00007fffc35eaf70) const at waifu2x.cpp:457:25 frame #5: 0x000000000084cd45 waifu2x-ncnn-vulkan`proc(args=0x00007fffffffdb70) at main.cpp:281:18 frame #6: 0x00000008008fd1c9 libthr.so.3`thread_start(curthread=0x0000000807874300) at thr_create.c:292:16
2020-08-08 22:50:12 +02:00
vulkan-headers>0:devel/vulkan-headers
LIB_DEPENDS= libwebp.so:graphics/webp \
libvulkan.so:graphics/vulkan-loader
USES= cmake compiler:${OPENMP}c++11-lib
USE_GITHUB= yes
GH_ACCOUNT= nihui
graphics/waifu2x-ncnn-vulkan: back out r539374 ncnn API is not stable, updates frequently break this port. Binary is also smaller when using bundled ncnn. $ size $(which waifu2x-ncnn-vulkan) text data bss dec hex filename -7245567 242384 58992 7546943 73283f /usr/local/bin/waifu2x-ncnn-vulkan +3281223 3152 58840 3343215 33036f /usr/local/bin/waifu2x-ncnn-vulkan $ waifu2x-ncnn-vulkan -i foo.png -o bar.png [0 Intel(R) HD Graphics 530 (SKL GT2)] queueC=0[1] queueG=0[1] queueT=0[1] [0 Intel(R) HD Graphics 530 (SKL GT2)] bugsbn1=0 buglbia=0 bugcopc=0 bugihfa=0 [0 Intel(R) HD Graphics 530 (SKL GT2)] fp16p=1 fp16s=1 fp16a=1 int8s=1 int8a=1 pipeline specialization count mismatch, expect 4 but got 1 new_pipeline failed pipeline specialization count mismatch, expect 4 but got 1 new_pipeline failed Process 8606 stopped * thread #14, name = 'waifu2x-ncnn-vul', stop reason = signal SIGSEGV: invalid address (fault address: 0x28) frame #0: 0x0000000802080be9 libvulkan_intel.so`anv_CmdPushDescriptorSetWithTemplateKHR(commandBuffer=0x000000080c432800, descriptorUpdateTemplate=0x0000000000000000, _layout=0x0000000000000000, _set=0, pData=0x000000080c440140) at anv_cmd_buffer.c:1372:69 1369 1370 assert(_set < MAX_PUSH_DESCRIPTORS); 1371 -> 1372 struct anv_descriptor_set_layout *set_layout = layout->set[_set].layout; 1373 1374 struct anv_descriptor_set *set = 1375 anv_cmd_buffer_push_descriptor_set(cmd_buffer, template->bind_point, (lldb) bt * thread #14, name = 'waifu2x-ncnn-vul', stop reason = signal SIGSEGV: invalid address (fault address: 0x28) * frame #0: 0x0000000802080be9 libvulkan_intel.so`anv_CmdPushDescriptorSetWithTemplateKHR(commandBuffer=0x000000080c432800, descriptorUpdateTemplate=0x0000000000000000, _layout=0x0000000000000000, _set=0, pData=0x000000080c440140) at anv_cmd_buffer.c:1372:69 frame #1: 0x00000000004facce waifu2x-ncnn-vulkan`ncnn::VkCompute::record_pipeline(this=<unavailable>, pipeline=0x00000008045e3400, buffer_bindings=0x00007fffc35ea418, image_bindings=0x00007fffc35ea0f0, constants=0x00007fffc35ea400, dispatcher=0x00007fffc35ea110) at command.cpp:1457:13 frame #2: 0x00000000004f981c waifu2x-ncnn-vulkan`ncnn::VkCompute::record_pipeline(ncnn::Pipeline const*, std::__1::vector<ncnn::VkMat, std::__1::allocator<ncnn::VkMat> > const&, std::__1::vector<ncnn::vk_constant_type, std::__1::allocator<ncnn::vk_constant_type> > const&, ncnn::VkMat const&) [inlined] ncnn::VkCompute::record_pipeline(this=<unavailable>, pipeline=<unavailable>, buffer_bindings=<unavailable>, image_bindings=0x00007fffc35ea0f0, constants=<unavailable>, dispatcher=<unavailable>) at command.cpp:1187:5 frame #3: 0x00000000004f97bb waifu2x-ncnn-vulkan`ncnn::VkCompute::record_pipeline(this=<unavailable>, pipeline=<unavailable>, bindings=<unavailable>, constants=<unavailable>, dispatcher=<unavailable>) at command.cpp:1175 frame #4: 0x000000000086b516 waifu2x-ncnn-vulkan`Waifu2x::process(this=0x00007fffffffdd58, inimage=0x00007fffc35eaf30, outimage=0x00007fffc35eaf70) const at waifu2x.cpp:457:25 frame #5: 0x000000000084cd45 waifu2x-ncnn-vulkan`proc(args=0x00007fffffffdb70) at main.cpp:281:18 frame #6: 0x00000008008fd1c9 libthr.so.3`thread_start(curthread=0x0000000807874300) at thr_create.c:292:16
2020-08-08 22:50:12 +02:00
GH_TUPLE= KhronosGroup:glslang:8.13.3743-39-gd39b8afc:glslang/src/ncnn/glslang \
Tencent:ncnn:20200727:ncnn/src/ncnn
CMAKE_SOURCE_PATH= ${WRKSRC}/src
CMAKE_ON= USE_SYSTEM_WEBP
PLIST_FILES= bin/${PORTNAME}
PORTDATA= *
.if !exists(/usr/include/omp.h)
# XXX ports/199603: LLVM openmp in base doesn't support aarch64, armv6, armv7 yet
OPENMP= gcc-
.endif
post-patch:
@${REINPLACE_CMD} -e '/PATHSTR/s,models-,${DATADIR}/&,' \
${WRKSRC}/src/main.cpp
do-install:
${INSTALL_PROGRAM} ${INSTALL_WRKSRC}/${PORTNAME} \
${STAGEDIR}${PREFIX}/bin
(cd ${WRKSRC}/models && ${COPYTREE_SHARE} "${PORTDATA}" \
${STAGEDIR}${DATADIR})
.include <bsd.port.mk>