-
Notifications
You must be signed in to change notification settings - Fork 944
[webgpu] Count byte usage. #1815
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 4 of 4 files at r1.
Reviewable status:complete! 1 of 1 approvals obtained (waiting on @annxingyuan, @dsmilkov, @nkreeger, and @nsthorat)
tfjs-webgpu/src/backend_webgpu.ts, line 119 at r1 (raw file):
memory(): WebGPUMemoryInfo { return {numBytesInGPU: this.numBytesInGPU, unreliable: false} as
you shouldn't have to cast this if you fill the fields fully
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 1 of 1 approvals obtained (waiting on @dsmilkov, @nkreeger, and @nsthorat)
tfjs-webgpu/src/backend_webgpu.ts, line 119 at r1 (raw file):
Previously, nsthorat (Nikhil Thorat) wrote…
you shouldn't have to cast this if you fill the fields fully
if i remove the cast it complains that the return object is missing fields from MemoryInfo like numTensors, numDataBuffers, etc. are you saying i should be filling in those fields?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 1 of 1 approvals obtained (waiting on @annxingyuan, @dsmilkov, and @nkreeger)
tfjs-webgpu/src/backend_webgpu.ts, line 119 at r1 (raw file):
Previously, annxingyuan (Ann Yuan) wrote…
if i remove the cast it complains that the return object is missing fields from MemoryInfo like numTensors, numDataBuffers, etc. are you saying i should be filling in those fields?
Yeah can you fill those fields?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 1 of 1 approvals obtained (waiting on @dsmilkov, @nkreeger, and @nsthorat)
tfjs-webgpu/src/backend_webgpu.ts, line 119 at r1 (raw file):
Previously, nsthorat (Nikhil Thorat) wrote…
Yeah can you fill those fields?
the way webgl works is it only provides numBytesInGPU
and unreliable
, and engine
merges those with its own records of numTensors
/ numDataBuffers
. do you think webgpu should work differently?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 1 of 1 approvals obtained (waiting on @annxingyuan, @dsmilkov, and @nkreeger)
tfjs-webgpu/src/backend_webgpu.ts, line 119 at r1 (raw file):
Previously, annxingyuan (Ann Yuan) wrote…
the way webgl works is it only provides
numBytesInGPU
andunreliable
, andengine
merges those with its own records ofnumTensors
/numDataBuffers
. do you think webgpu should work differently?
Ah apologies, we probably should have improved these typings above this (not having an extension of a base interface). LGTM for this for now.
Changes
memory
to backendTo see the logs from the Cloud Build CI, please join either
our discussion
or announcement mailing list.
This change is