You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks not strange but when I run make ampere, got an error with "incomplete type is not allowed" at dlimbs_approximate and dlimbs_div_estimate function. Took some time debugging it and found out in dispatch_dlimbs.cu we defined four dlimbs_algs_t but only instantiated three, so it happens when LIMBS are larger than TPI.
The text was updated successfully, but these errors were encountered:
This is a good point!
The CGBN team has got to solve this problem. We may also try to instantiate the dlimbs_algs_multi class of dispatch_dlimbs_t on our own, but this would be a difficult challenge, wouldn't it be?
If the maximum number of binary bits in CGBN is 32768 (they say 32K in the documentation), the maximum TPI is 32, and there are 32 bits per limb, then for the cases when the number of limbs is greater than TPI we have five situations:
64 limbs * 32 bits = 2048 BITS
128 limbs * 32 bits = 4096 BITS
256 limbs * 32 bits = 8192 BITS
512 limbs * 32 bits = 16384 BITS
1024 limbs * 32 bits = 32768 BITS
and if we divide the number of limbs by the max. TPI=32, then the dlimbs_algs_multi class should cover all the five cases when limbs are greater than TPI and powers of two, i.e. the factors of multiplication between TPI and LIMBS - aka the LIMBS/TPI quotient - would be 2, 4, 8, 16, and 32.
Maybe they should simply instantiate one single dlimbs_algs_multi that respects the rule (LIMBS <= 32*TPI), otherwise there would be 5 structures like isTwo, isFour, isEight, isSixteen, isThirtyTwo :) . This way CGBN should work also with numbers between 1024 and 32768 binary bits. Right now it is an incomplete work and nobody answers.
LE: As a matter of fact, if the TPI is lower (like 4) and we use the 32768 BITS precision, we will get 1024 LIMBS and the LIMBS/TPI quotient will be 256. So the above rule for dlimbs_algs_multi may even be (LIMBS <= 256*TPI). And it would be more appropriate and easier for the CGBN team to take care of this (than for stranger contributors) as the NVIDIA people already know their stuff :) .
@sethtroisi Is there going to be a new CGBN release anytime soon?
Same issue as this , but an easier way to replay it.
When I tried to add some more class in size.h just like:
and add tests in unit_test.cc with:
It looks not strange but when I run
make ampere
, got an error with "incomplete type is not allowed" at dlimbs_approximate and dlimbs_div_estimate function. Took some time debugging it and found out in dispatch_dlimbs.cu we defined four dlimbs_algs_t but only instantiated three, so it happens when LIMBS are larger than TPI.The text was updated successfully, but these errors were encountered: