[XLA:GPU] Output fuse bias adds into dot
TuplePointsToAnalysis already knows how to share the input to the add with the output of the fusion. If for whatever reason the sharing is not possible, emit a memcpy from input to output before calling gemm. The change is mostly straight-forward, there's one complication with the online autotune of gemms. We allocate a scratch buffer to avoid overwriting the bias during autotune. This doesn't do anything fancy like trying to combine the scalar mul with the add. We could do but it doesn't seem to be worth the additional complexity. PiperOrigin-RevId: 219492278
Loading
Please sign in to comment