Skip to content
This repository was archived by the owner on Aug 15, 2019. It is now read-only.

Commit bfff620

Browse files
caisqdsmilkov
authored andcommitted
Reduce the size of the gramSchmidt-non-tiny test (#1872)
cla: yes * Reduce the size of the gramSchmidt-non-tiny test Without the change, the test prints slowness warning on my machine: Chrome 76.0.3809 (Linux 0.0.0) SLOW 0.708 secs: gramSchmidt-non-tiny webgl1 {"WEBGL_VERSION":1,"WEBGL_CPU_FORWARD":false,"WEBGL_SIZE_UPLOAD_UNIFORM":0} 16x32 . Chrome 76.0.3809 (Linux 0.0.0) SLOW 0.641 secs: gramSchmidt-non-tiny webgl2 {"WEBGL_VERSION":2,"WEBGL_CPU_FORWARD":false,"WEBGL_SIZE_UPLOAD_UNIFORM":0} 16x32 With the change, it no longer prints the warning. DEV
1 parent 9f5ec47 commit bfff620

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backends/webgl/webgl_ops_test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,13 +432,13 @@ describeWithFlags('conv to matmul', PACKED_ENVS, () => {
432432
// For operations on non-trivial matrix sizes, we skip the CPU-only ENV and use
433433
// only WebGL ENVs.
434434
describeWithFlags('gramSchmidt-non-tiny', WEBGL_ENVS, () => {
435-
it('16x32', async () => {
435+
it('8x16', async () => {
436436
// Part of this test's point is that operation on a matrix of this size
437437
// can complete in the timeout limit of the unit test.
438-
const xs = tf.randomUniform([16, 32]) as Tensor2D;
438+
const xs = tf.randomUniform([8, 16]) as Tensor2D;
439439
const y = tf.linalg.gramSchmidt(xs) as Tensor2D;
440440
expectArraysClose(
441-
await y.matMul(y.transpose()).data(), await tf.eye(16).data());
441+
await y.matMul(y.transpose()).data(), await tf.eye(8).data());
442442
});
443443
});
444444

0 commit comments

Comments
 (0)