Request: Unit tests for lgamma, lgamma_r, and tgamma

Hey all,

I’m trying to finish off a long-winded attempt to get the CL kernels generated by cppamp-driver-ng from multicoreware (possibly now rebranded/merged as AMD’s hcc) to compile/run with mesa/clover/libclc

I started working on the tgamma implementation as part of that, and in order to port the tgamma implementation from the amd-builtins branch, I also had to pull over lgamma, and lgamma_r. I’ve got the implementations copied over and vectorized, but I don’t have a decent set of tests to verify accuracy/correctness yet.

I can try to find something, but does anyone know of some decent unit tests/values for accuracy of these functions? It’d save me a bit of trouble if I don’t have to figure them out myself, and any existing tests probably have much better coverage of any boundary conditions I wouldn’t know much about.

I’ve been short on time for personal projects over the last year or so, so any help in this regard would be appreciated. If no one has anything, then I’ll probably just start with what Beignet has, and eventually use HCC’s unit tests to at least make sure we’re in the ballpark.

–Aaron

P.S. If anyone wants to look into cppamp-driver-ng/HCC, the only built-in functions that are missing (to my knowledge) are:

expm1

logb

remainder

tgamma

Support for the CL 1.2 static keyword might also be required, but that’s probably a mesa/clover enhancement that needs to be done.

If you post the patches I can run them through the OpenCL conformance test when I get a chance

-Matt