[code-reflection] Integrated: Added OpWrapper for CoreOp.NegOp (needed for blackscholes)
Gary Frost
gfrost at openjdk.org
Wed Oct 16 11:19:07 UTC 2024
Blackscholes example failed when generating CUDA/OpenCL via C99HatBuilder
We were missing OpWrapper for CoreOp.NegOp (unary - )
This PR fixes that and adds balckscholes to new `bld` script
There is still a code-gen issue stemming from
@CodeReflection
public static float CND(float input) {
// yada
if (input >= 0f) {
return 1f - part1 * part2;
}else{
return part1 * part2;
}
}
Which incorrectly generates OpenCL
if(input>=0.0){
return 1.0-part1*part2;
}else{
return part1*part2;
}
return; //<---------------- ???
-------------
Commit messages:
- Added OpWrapper for CoreOp.NegOp (needed for blackscholes)
- Added OpWrapper C99 gen for Core.NegOp (needed for blackscholes)
Changes: https://git.openjdk.org/babylon/pull/255/files
Webrev: https://webrevs.openjdk.org/?repo=babylon&pr=255&range=00
Stats: 457 lines in 9 files changed: 257 ins; 75 del; 125 mod
Patch: https://git.openjdk.org/babylon/pull/255.diff
Fetch: git fetch https://git.openjdk.org/babylon.git pull/255/head:pull/255
PR: https://git.openjdk.org/babylon/pull/255
More information about the babylon-dev
mailing list