- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
While working on our own implementation of a polyphase resampler, we noticied that IPP's resampler is about 10 times slower than what we could achieve.
IPP being a performance library, we did not expect to be faster, even less to be that much faster.
Minimal code :
#include <iostream>
#include <chrono>
#include <ipp.h>
int main()
{
ippInit();
int p = 210000;
int q = 244133;
int in_size = 4096000;
Ipp32f rolloff = 0.95f;
Ipp32f alpha = 54.0721f;
int history_size = std::max(64, int(float(p)/float(q)));
int filter_size = 2*(history_size - 1);
auto tp1 = std::chrono::steady_clock::now();
int size;
int len;
int height;
ippsResamplePolyphaseFixedGetSize_32f(p, q, filter_size, &size, &len, &height, ippAlgHintFast);
IppsResamplingPolyphaseFixed_32f * spec = (IppsResamplingPolyphaseFixed_32f*)ippsMalloc_8u(size);
auto tp2 = std::chrono::steady_clock::now();
ippsResamplePolyphaseFixedInit_32f(p, q, filter_size, rolloff, alpha, spec, ippAlgHintFast);
auto tp3 = std::chrono::steady_clock::now();
Ipp32f * inBuf = ippsMalloc_32f(in_size);
Ipp32f * outBuf = ippsMalloc_32f((int)((in_size)*q/(float)p+2));
ippsZero_32f(inBuf, in_size);
Ipp64f time = 0;
int out_size;
ippsResamplePolyphaseFixed_32f(inBuf, in_size, outBuf, 0.98f, &time, &out_size, spec);
auto tp4 = std::chrono::steady_clock::now();
std::cout << "aloc = " << (tp2-tp1).count() / 1'000'000 << "ms\n"
<< "init = " << (tp3-tp2).count() / 1'000'000 << "ms\n"
<< "run = " << (tp4-tp4).count() / 1'000'000 << "ms" << std::endl;
}Output :
aloc = 1ms
init = 1663ms
run = 0ms
IPP version 2022.2.0 (latest)
OS : Ubuntu 24.04
CPU : Intel(R) Xeon(R) Platinum 8468
Flags :
fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect user_shstk avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts vnmi avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr ibt amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
The difference gets bigger the bigger the inRate and outRate get ...
I cant share our code, sadly, but we used an optimized implementation of the cyl_bessel_i function with mu=0
Link Copied
0 Replies
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page