MCPcopy Create free account
hub / github.com/pytorch/pytorch / FetchInt8Blob

Function FetchInt8Blob

caffe2/python/workspace.py:406–421  ·  view source on GitHub ↗

Fetches an Int8 blob from the workspace. It shared backend implementation with FetchBlob but it is recommended when fetching Int8 Blobs Inputs: name: the name of the Int8 blob - a string or a BlobReference Returns: data: int8 numpy array, data scale: float, fake quanti

(name)

Source from the content-addressed store, hash-verified

404
405
406def FetchInt8Blob(name):
407 """Fetches an Int8 blob from the workspace. It shared backend implementation
408 with FetchBlob but it is recommended when fetching Int8 Blobs
409
410 Inputs:
411 name: the name of the Int8 blob - a string or a BlobReference
412 Returns:
413 data: int8 numpy array, data
414 scale: float, fake quantization scale
415 zero_point: int, fake quantization offset
416 """
417 result = C.fetch_blob(StringifyBlobName(name))
418 assert isinstance(result, tuple), \
419 'You are not fetching an Int8Blob {}. Please use FetchBlob'.format(
420 StringifyBlobName(name))
421 return Int8Tensor(*result)
422
423
424def FetchInt8BlobRealVal(name):

Callers

nothing calls this directly

Calls 3

StringifyBlobNameFunction · 0.85
isinstanceFunction · 0.85
formatMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…