Skip to content

Commit

Permalink
Add cmul and cdiv for float16 type
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongkaifu committed Oct 8, 2024
1 parent 7c93f7a commit b3b8fed
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions TensorSharp.CUDA/DeviceCode/ElementwiseOpKernels.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ private static string GetFullCode()
AppendTTSHalfFunc(result, "mul", "__hmul");
AppendTTSHalfFunc(result, "div", "__hdiv");
AppendTTTFunc(result, "cadd", "__hadd", DType.Float16);
AppendTTTFunc(result, "cmul", "__hmul", DType.Float16);
AppendTTTFunc(result, "cdiv", "__hdiv", DType.Float16);

AppendAtomicAdd(result, "atomicAdd", DType.Float16);
}

Expand Down

0 comments on commit b3b8fed

Please sign in to comment.