Ok. I will check if we can use AND mask and provide more information to user.
On Tue, Nov 3, 2015 at 10:36 AM, Deepthi Nandakumar < deep...@multicorewareinc.com> wrote: > Since the idea here is to correctly log a user-generated error (user-cpuid > > detected cpuid), the patch is headed in the right direction. > > Min's suggestion on using an AND mask sounds good, and can you also make > the warning more informative (print user-cpuid, and the cpuid we're > defaulting to) ? > > On Thu, Oct 29, 2015 at 11:16 PM, Steve Borho <st...@borho.org> wrote: > >> On 10/28, dnyanesh...@multicorewareinc.com wrote: >> > # HG changeset patch >> > # User Dnyaneshwar G <dnyanesh...@multicorewareinc.com> >> > # Date 1446021877 -19800 >> > # Wed Oct 28 14:14:37 2015 +0530 >> > # Node ID 975087370d14e90cd63edecb34fb4bf2feda2468 >> > # Parent 6563218ce342c30bfd4f9bc172a1dab510e6e55b >> > fix invalid Instruction Set provided in CLI if CPU doesn't support it >> > >> > This patch avoids crash/invalid instructions when we provide >> instruction sets to >> > be used are higher than the cpu capabilities. >> > >> > For example, if our cpu supports instruction sets upto AVX and we >> provide >> > --asm "avx2" (AVX2 is higher than AVX) then it will show warning and >> use default >> > x265 detected intruction sets. >> >> The whole point of having this override is in case our CPU detection is >> somehow wrong. The user needs to be able to override the detection mask. >> >> That said.. if the user provided mask has bits set that were not >> detected, it's ok to log a serious warning that says you think the >> encoder is about to break and it is the user's fault. >> >> BTW: this feature is often used for benchmarking, to disable certain >> optimizations piecemeal, but that is not the primary reason why it >> exists. >> >> > diff -r 6563218ce342 -r 975087370d14 source/common/primitives.cpp >> > --- a/source/common/primitives.cpp Mon Oct 26 12:13:53 2015 +0530 >> > +++ b/source/common/primitives.cpp Wed Oct 28 14:14:37 2015 +0530 >> > @@ -238,6 +238,15 @@ >> > primitives.cu[i].intra_pred_allangs = NULL; >> > >> > #if ENABLE_ASSEMBLY >> > + >> > + if ((uint32_t)param->cpuid > X265_NS::cpu_detect()) >> > + { >> > + if (param->logLevel >= X265_LOG_INFO) >> > + x265_log(param, X265_LOG_WARNING, "Unsupported CPUID >> provided in CLI, so choosing x265 detected CPUID!\n"); >> > + >> > + param->cpuid = X265_NS::cpu_detect(); >> > + } >> > + >> > setupInstrinsicPrimitives(primitives, param->cpuid); >> > setupAssemblyPrimitives(primitives, param->cpuid); >> > #endif >> > _______________________________________________ >> > x265-devel mailing list >> > x265-devel@videolan.org >> > https://mailman.videolan.org/listinfo/x265-devel >> >> -- >> Steve Borho >> _______________________________________________ >> x265-devel mailing list >> x265-devel@videolan.org >> https://mailman.videolan.org/listinfo/x265-devel >> > > > > -- > Deepthi Nandakumar > Engineering Manager, x265 > Multicoreware, Inc > > _______________________________________________ > x265-devel mailing list > x265-devel@videolan.org > https://mailman.videolan.org/listinfo/x265-devel > >
_______________________________________________ x265-devel mailing list x265-devel@videolan.org https://mailman.videolan.org/listinfo/x265-devel