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

Don't upload small tensors as uniforms to packed op programs #1429

Merged
merged 2 commits into from
Dec 5, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/kernels/backend_webgl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1840,7 +1840,7 @@ export class MathBackendWebGL implements KernelBackend {
let texData = this.texData.get(input.dataId);

if (texData.texture == null) {
if (!(!texData.isPacked && program.usesPackedTextures) &&
if (!program.usesPackedTextures &&
util.sizeFromShape(input.shape) <=
ENV.get('WEBGL_SIZE_UPLOAD_UNIFORM')) {
// Upload small tensors that live on the CPU as uniforms, not as
Expand Down