halide / Halide

a language for fast, portable data-parallel computation
https://halide-lang.org
Other
5.82k stars 1.07k forks source link

[PTX] Target integer math intrinsics #8009

Open rootjalex opened 8 months ago

rootjalex commented 8 months ago

PTX has support for a number of integer ops that are useful, such as saturating add/sub, widening mul / mul hi, etc. (i.e. mul variants). We don't currently have any machinery to target these from integer intrinsics like we do in the CPU backends, but probably should.

abadams commented 2 months ago

As a caution: I know some integer instructions in PTX are basically deprecated. If you use them, the ptx compiler emulates them.