Skip to content

Commit 373972d

Browse files
authored
Use unpacked div always while we figure out why packed div produces NaNs.
BUG
1 parent 30f50d8 commit 373972d

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/kernels/backend_webgl.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1341,9 +1341,11 @@ export class MathBackendWebGL implements KernelBackend {
13411341
realDivide(a: Tensor, b: Tensor): Tensor {
13421342
const op = binaryop_gpu.DIV;
13431343
const outputDtype = 'float32';
1344-
if (ENV.get('WEBGL_PACK_BINARY_OPERATIONS')) {
1345-
return this.packedBinaryOp(a, b, binaryop_packed_gpu.DIV, outputDtype);
1346-
}
1344+
// TODO: https://github.com/tensorflow/tfjs/issues/1324
1345+
// Revive this once we understand why this produces NaNs.
1346+
// if (ENV.get('WEBGL_PACK_BINARY_OPERATIONS')) {
1347+
// return this.packedBinaryOp(a, b, binaryop_packed_gpu.DIV, outputDtype);
1348+
// }
13471349
const program = new BinaryOpProgram(op, a.shape, b.shape);
13481350
const output = this.makeOutputArray(program.outputShape, outputDtype);
13491351
return this.compileAndRun<Tensor>(program, [a, b], output);

0 commit comments

Comments
 (0)