Skip to content

Commit

Permalink
add max(half, half) support when enable fp16
Browse files Browse the repository at this point in the history
fix cpplint error, replace tab with whitespace
  • Loading branch information
ZQPei authored Aug 21, 2019
1 parent 929dff3 commit 2f8a10a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/codegen/codegen_cuda.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ std::string CodeGenCUDA::Finish() {
if (enable_fp16_) {
decl_stream << "#include <cuda_fp16.h>\n";
decl_stream << "__device__ half max(const half a, const half b)\n"
"{\n\treturn __hgt(__half(a), __half(b)) ? a : b;\n}\n";
"{\n return __hgt(__half(a), __half(b)) ? a : b;\n}\n";
}

if (enable_int8_) {
Expand Down

0 comments on commit 2f8a10a

Please sign in to comment.