Fix formatting problems. (#11980)
This commit is contained in:
parent
17923f4987
commit
f76adbce27
@ -178,9 +178,7 @@ suggested implementation is to:
|
||||
file, but the specialization for the GPUDevice is defined in a .cu.cc file,
|
||||
since it will be compiled with the CUDA compiler.
|
||||
|
||||
<!--zippy-->
|
||||
|
||||
Expand this to see the example implementation.
|
||||
Here is an example implementation.
|
||||
|
||||
```c++
|
||||
// example.h
|
||||
@ -307,8 +305,6 @@ template struct ExampleFunctor<GPUDevice, int32>;
|
||||
#endif // GOOGLE_CUDA
|
||||
```
|
||||
|
||||
<!--endzippy-->
|
||||
|
||||
## Build the op library
|
||||
### Compile the op using your system compiler (TensorFlow binary installation)
|
||||
|
||||
@ -763,7 +759,7 @@ Your op registration now specifies that the input's type must be `float`, or
|
||||
> """
|
||||
> ```
|
||||
|
||||
<pre><pre class="prettyprint"><code class="lang-cpp">
|
||||
<pre class="prettyprint"><code class="lang-cpp">
|
||||
\#include "tensorflow/core/framework/op_kernel.h"<br/>
|
||||
class ZeroOut<b>Int32</b>Op : public OpKernel {
|
||||
// as before
|
||||
@ -803,7 +799,7 @@ REGISTER\_KERNEL\_BUILDER(
|
||||
.Device(DEVICE\_CPU)
|
||||
.TypeConstraint<float>("T"),
|
||||
ZeroOutFloatOp);
|
||||
</b></code></pre></pre>
|
||||
</b></code></pre>
|
||||
|
||||
> To preserve [backwards compatibility](#backwards-compatibility), you should
|
||||
> specify a [default value](#default-values-constraints) when adding an attr to
|
||||
|
Loading…
Reference in New Issue
Block a user