/usr/local/lib64/python3.6/site-packages/caffe2/python/__pycache__
NameSizeModeActions
allcompare_test.cpython-36.pyc27100644editdlrm
attention.cpython-36.pyc49380644editdlrm
benchmark_generator.cpython-36.pyc39100644editdlrm
binarysize.cpython-36.pyc48530644editdlrm
brew.cpython-36.pyc38490644editdlrm
brew_test.cpython-36.pyc104520644editdlrm
build.cpython-36.pyc3400644editdlrm
cached_reader.cpython-36.pyc29540644editdlrm
caffe_translator.cpython-36.pyc241650644editdlrm
caffe_translator_test.cpython-36.pyc29290644editdlrm
checkpoint.cpython-36.pyc279730644editdlrm
checkpoint_test.cpython-36.pyc94620644editdlrm
cnn.cpython-36.pyc84350644editdlrm
context.cpython-36.pyc40080644editdlrm
context_test.cpython-36.pyc26650644editdlrm
control.cpython-36.pyc144660644editdlrm
control_ops_grad.cpython-36.pyc163650644editdlrm
control_ops_grad_test.cpython-36.pyc15020644editdlrm
control_ops_util.cpython-36.pyc83320644editdlrm
control_test.cpython-36.pyc118700644editdlrm
convert.cpython-36.pyc1480644editdlrm
convert_test.cpython-36.pyc5680644editdlrm
convnet_benchmarks.cpython-36.pyc129450644editdlrm
convnet_benchmarks_test.cpython-36.pyc10900644editdlrm
core.cpython-36.pyc944280644editdlrm
core_gradients_test.cpython-36.pyc248250644editdlrm
core_test.cpython-36.pyc339420644editdlrm
crf.cpython-36.pyc76220644editdlrm
crf_predict.cpython-36.pyc10440644editdlrm
crf_viterbi_test.cpython-36.pyc16770644editdlrm
dataio.cpython-36.pyc239780644editdlrm
dataio_test.cpython-36.pyc132670644editdlrm
dataset.cpython-36.pyc128790644editdlrm
data_parallel_model.cpython-36.pyc514160644editdlrm
data_parallel_model_test.cpython-36.pyc389230644editdlrm
data_workers.cpython-36.pyc131420644editdlrm
data_workers_test.cpython-36.pyc45220644editdlrm
db_file_reader.cpython-36.pyc53610644editdlrm
db_test.cpython-36.pyc13280644editdlrm
device_checker.cpython-36.pyc40140644editdlrm
dyndep.cpython-36.pyc15680644editdlrm
embedding_generation_benchmark.cpython-36.pyc42030644editdlrm
experiment_util.cpython-36.pyc32330644editdlrm
extension_loader.cpython-36.pyc5430644editdlrm
fakefp16_transform_lib.cpython-36.pyc5460644editdlrm
filler_test.cpython-36.pyc9250644editdlrm
functional.cpython-36.pyc35310644editdlrm
functional_test.cpython-36.pyc41320644editdlrm
fused_8bit_rowwise_conversion_ops_test.cpython-36.pyc36310644editdlrm
gradient_checker.cpython-36.pyc106220644editdlrm
gradient_check_test.cpython-36.pyc167880644editdlrm
gru_cell.cpython-36.pyc25960644editdlrm
hip_test_util.cpython-36.pyc6690644editdlrm
hsm_util.cpython-36.pyc18230644editdlrm
hypothesis_test.cpython-36.pyc843120644editdlrm
hypothesis_test_util.cpython-36.pyc200390644editdlrm
ideep_test_util.cpython-36.pyc10810644editdlrm
layers_test.cpython-36.pyc573720644editdlrm
layer_model_helper.cpython-36.pyc216410644editdlrm
layer_model_instantiator.cpython-36.pyc36650644editdlrm
layer_parameter_sharing_test.cpython-36.pyc56260644editdlrm
layer_test_util.cpython-36.pyc52730644editdlrm
lazy.cpython-36.pyc4240644editdlrm
lazy_dyndep.cpython-36.pyc24750644editdlrm
lazy_dyndep_test.cpython-36.pyc48070644editdlrm
lengths_reducer_fused_8bit_rowwise_ops_test.cpython-36.pyc43920644editdlrm
lengths_reducer_rowwise_8bit_ops_test.cpython-36.pyc36840644editdlrm
lstm_benchmark.cpython-36.pyc72820644editdlrm
memonger.cpython-36.pyc321700644editdlrm
memonger_test.cpython-36.pyc231000644editdlrm
mkl_test_util.cpython-36.pyc11910644editdlrm
model_device_test.cpython-36.pyc33760644editdlrm
model_helper.cpython-36.pyc186180644editdlrm
model_helper_test.cpython-36.pyc19910644editdlrm
modifier_context.cpython-36.pyc26500644editdlrm
muji.cpython-36.pyc55660644editdlrm
muji_test.cpython-36.pyc35670644editdlrm
net_builder.cpython-36.pyc267860644editdlrm
net_builder_test.cpython-36.pyc92550644editdlrm
net_drawer.cpython-36.pyc100560644editdlrm
net_printer.cpython-36.pyc143670644editdlrm
net_printer_test.cpython-36.pyc33230644editdlrm
nomnigraph.cpython-36.pyc51250644editdlrm
nomnigraph_test.cpython-36.pyc145910644editdlrm
nomnigraph_transformations.cpython-36.pyc24310644editdlrm
nomnigraph_transformations_test.cpython-36.pyc40730644editdlrm
normalizer.cpython-36.pyc19410644editdlrm
normalizer_context.cpython-36.pyc15530644editdlrm
normalizer_test.cpython-36.pyc8700644editdlrm
numa_benchmark.cpython-36.pyc18860644editdlrm
numa_test.cpython-36.pyc16260644editdlrm
observer_test.cpython-36.pyc41810644editdlrm
operator_fp_exceptions_test.cpython-36.pyc13050644editdlrm
optimizer.cpython-36.pyc456060644editdlrm
optimizer_context.cpython-36.pyc20080644editdlrm
optimizer_test.cpython-36.pyc247470644editdlrm
optimizer_test_util.cpython-36.pyc68080644editdlrm
parallelize_bmuf_distributed_test.cpython-36.pyc69900644editdlrm
parallel_workers.cpython-36.pyc91480644editdlrm
parallel_workers_test.cpython-36.pyc38240644editdlrm
pipeline.cpython-36.pyc129400644editdlrm
pipeline_test.cpython-36.pyc27150644editdlrm
predictor_constants.cpython-36.pyc3040644editdlrm
python_op_test.cpython-36.pyc105020644editdlrm
queue_util.cpython-36.pyc50550644editdlrm
record_queue.cpython-36.pyc42250644editdlrm
recurrent.cpython-36.pyc98930644editdlrm
regularizer.cpython-36.pyc186040644editdlrm
regularizer_context.cpython-36.pyc15620644editdlrm
regularizer_test.cpython-36.pyc88250644editdlrm
rnn_cell.cpython-36.pyc447850644editdlrm
schema.cpython-36.pyc417630644editdlrm
schema_test.cpython-36.pyc137870644editdlrm
scope.cpython-36.pyc26000644editdlrm
scope_test.cpython-36.pyc40680644editdlrm
session.cpython-36.pyc73460644editdlrm
session_test.cpython-36.pyc23530644editdlrm
sparse_to_dense_mask_test.cpython-36.pyc52980644editdlrm
sparse_to_dense_test.cpython-36.pyc30030644editdlrm
task.cpython-36.pyc222070644editdlrm
task_test.cpython-36.pyc11780644editdlrm
test_util.cpython-36.pyc37290644editdlrm
text_file_reader.cpython-36.pyc22390644editdlrm
timeout_guard.cpython-36.pyc31060644editdlrm
toy_regression_test.cpython-36.pyc23600644editdlrm
transformations.cpython-36.pyc18330644editdlrm
transformations_test.cpython-36.pyc96080644editdlrm
tt_core.cpython-36.pyc64680644editdlrm
tt_core_test.cpython-36.pyc18240644editdlrm
utils.cpython-36.pyc122450644editdlrm
utils_test.cpython-36.pyc14160644editdlrm
visualize.cpython-36.pyc60270644editdlrm
workspace.cpython-36.pyc226900644editdlrm
workspace_test.cpython-36.pyc290550644editdlrm
_import_c_extension.cpython-36.pyc15240644editdlrm
__init__.cpython-36.pyc26070644editdlrm
Edit: /usr/local/lib64/python3.6/site-packages/caffe2/python/__pycache__/workspace.cpython-36.pyc (22690B)
3 Egb@sddlZddlZddlmZddlmZddlZddlmZddlZddl Z ddl m Z ddl Z ddlZddlZddlmZddlmZmZddlmZddljjZejeZejZej Z!ej"Z#ej$Z%ej&Z'ej(Z)ej*Z+ej,Z-ej.Z/ej0Z1ej2Z3ej4Z5ej6Z7ej8Z9ej:Z;ejZ?ej@Z@ejAZAejBZBejCZCejDZDeBrnejEZFejGZHejGZIejJZKejLZMd d ZNejOZPejQZRnd d ZHd d ZKdd ZMeCrejSZFejTZIejUZVdd ZNejOZPejQZReDsejEZFdd ZIdd ZPdd ZNdd ZRejWZXejYZZej[Z\ej]Z^ddZ_ddZ`d|ddZaddZbd}ddZcd~dd Zdd!d"Zed#d$Zfd%d&Zgd'd(Zhd)d*Zid+d,Zjd-d.Zkd/d0Zldd2d3Zmd4d5Znd6d7Zodd8d9Zpd:d;Zqdd?Zsd@dAZtddBdCZudDdEZvdFdGZwdHdIZxejydJdKdLdMgZzdNdOZ{dPdQZ|dRdSZ}e}ej~_dTdUZdVdWZdXdYZGdZd[d[eZeZdad\Zd]ad^d_Zejd`daZddbdcZdddeZdfdgZdhdiZdjdkZdldmZddndoZdpdqZddrdsZdtduZej~Z~ee~_ee~_ee~_ee~_ddvdwZeej_dxdyZeej_dzd{Zeej_dS)N)Message)Process) defaultdict) basestring) caffe2_pb2)scopeutils)TriggerLazyImportcCstjtjS)N)npasarrayCZget_cuda_peer_access_patternr r C/usr/local/lib64/python3.6/site-packages/caffe2/python/workspace.pyGetGpuPeerAccessPattern=srcCsdS)Nrr r r r rDsrcCsdS)Nrr r r r rrFscCsdS)Nrr r r r rrHscCstjtjS)N)r r r Zget_hip_peer_access_patternr r r rrPscCsdS)Nrr r r r rrZscCsdS)Nr )xr r rr[scCs tjgS)N)r arrayr r r rr\scCsdS)Nr r r r rr^scCstj|jj||dS)N)r Zfill_random_network_inputsProtoSerializeToString)netZ input_dimsZ input_typesr r rFillRandomNetworkInputsfsrcCsTtjtjtj}|jd}|dkr&dStj}|jd|jd}|j|SdS) zGet a free flask port. 127.0.0.1rN)rr)rr)socketAF_INET SOCK_STREAM connect_exbind getsocknameclose)sockresultsportr r r_GetFreeFlaskPortjs   r&cCsfddlm}|dkrtj}|dkr*t}t|jdt|d|gfd}|jt dj t j ||S)zStart a mint instance. TODO(Yangqing): this does not work well under ipython yet. According to https://github.com/ipython/ipython/issues/5862 writing up some fix is a todo item. r)appNz-pz-r)targetargszMint running at http://{}:{}) Zcaffe2.python.mintr'r root_folderr&rmainstrstartprintformatrgetfqdn)r*r%r'processr r r StartMint|s r2cCsLt|tr|St|tr |jSt|dr6|jjStdt|jdS)aStringify a protocol buffer object. Inputs: obj: a protocol buffer object, or a Pycaffe2 object that has a Proto() function. Outputs: string: the output protobuf string. Raises: AttributeError: if the passed in object does not have the right attribute. rz.Unexpected argument to StringifyProto of type N) isinstancerrrhasattrr ValueErrortype__name__)objr r rStringifyProtos    r9cCs:|dkrtjtjStjj|s,tj|tj|SdS)N)r Zreset_workspacer*ospathexistsmakedirs)r*r r rResetWorkspaces   r>FcCsJt|dkrg}x|D]}tj|qWttjtjjjt|t ||S)N) r r create_blobCallWithExceptionIntercept create_net Workspacecurrent_last_failed_op_net_position GetNetNamer9)r overwriteZ input_blobsZ input_blobr r r CreateNets rGcCstjt|t|S)N)r Predictorr9)init_netZ predict_netr r rrHsrHcCstjt||S)N)r Zget_operator_costr9)operatorblobsr r rGetOperatorCostsrLcCstjt|S)N)r Zrun_operator_oncer9)rJr r rRunOperatorOncesrMcCstjt||S)N)r Zrun_operator_multipler9)rJZnum_runsr r rRunOperatorMultiplesrNcCs"x|D]}t|}|sdSqWdS)NFT)rM) operatorsopsuccessr r rRunOperatorsOnces  rRcCstjS)N)r Zclear_global_net_observerr r r rClearGlobalNetObserversrSc Osy |||Stk r|}tj|d}tjdj|||r||kr||}x0t|D]$}tjdj|d|d|dq\WYnXdS)NzgOriginal python traceback for operator `{}` in network `{}` in exception above (most recent call last):z File "{}", line {}, in {}rr) Exceptionoperator_tracebacksgetloggerwarningr/reversed) funcZ op_id_fetcherZnet_namer)kwargsZop_idZnet_tracebackstbliner r rr@s    r@cCsttjtjjjt|t|S)N)r@r Z run_net_oncerBrCrDrEr9)rr r r RunNetOnces r_rcCs"ttjtjjjt|t|||S)aRuns a given net. Inputs: name: the name of the net, or a reference to the net. num_iter: number of iterations to run allow_fail: if True, does not assert on net exec failure but returns False Returns: True or an exception. )r@r Zrun_netrBrCrDrEStringifyNetName)nameZnum_iterZ allow_failr r rRunNets rbcCs0ddljj}t||jr"|j|}tjt|S)Nr) caffe2.python.corepythoncorer3 ExecutionStepPlanr Zrun_planr9) plan_or_steprer r rRunPlans   ricCs0ddljj}t||jr"|j|}tjt|S)Nr) rcrdrer3rfrgr Zrun_plan_in_backgroundr9)rhrer r rRunPlanInBackgrounds   rjc Cs|rdd|D}ndd|D}|dkrB|dks6ttj|}n$|dkrXtj||}ntj|||}tj}|j|i}i}x0|jD]&} | jst | j || j <| j || j <qW||fS)aInfers the shapes and types for the specified nets. Inputs: nets: the list of nets blob_dimensions (optional): a dictionary of blobs and their dimensions. If not specified, the workspace blobs are used. nets_proto (optional): a boolean flag indicating whether the protobuffer representation is passed to the routine. Returns: A tuple of (shapes, types) dictionaries keyed by blob name. cSsg|] }t|qSr )r9).0nr r r ,sz'InferShapesAndTypes..cSsg|]}t|jqSr )r9r)rkrlr r rrm.sN) AssertionErrorr Z%infer_shapes_and_types_from_workspaceZinfer_shapes_and_types_from_maprZ TensorShapesParseFromStringshapesZ unknown_shapelistZdimsraZ data_type) netsZblob_dimensionsZ nets_protoZ blob_typesZ net_protosZblobdesc_prototxtZblobdesc_protorptypestsr r rInferShapesAndTypess(       rucCs0t|tr|St|j|ks(td|t|S)NzExpected a string or %s)r3rr6r7rnr,)ra expected_typer r r_StringifyNameFs   rwcCs t|dS)NZ BlobReference)rw)rar r rStringifyBlobNameNsrxcCs t|dS)NNet)rw)rar r rr`Rsr`cCsZt|tr|St|jdks*t|jdkr2|jSt|tjrD|jStdj t |dS)NryZNetWithShapeInferencezNot a Net object: {}) r3rr6r7NamerNetDefrarUr/r,)rr r rrEVs  rEcCstjj}t||||S)aNFeeds a blob into the workspace. Inputs: name: the name of the blob. arr: either a TensorProto object or a numpy array object to be fed into the workspace. device_option (optional): the device option to feed the data with. Returns: True or False, stating whether the feed is successful. )r rBrC_Workspace_feed_blob)raarr device_optionwsr r rFeedBlob`s rcCsdd|DS)zFetches a list of blobs from the workspace. Inputs: names: list of names of blobs - strings or BlobReferences Returns: list of fetched blobs cSsg|] }t|qSr ) FetchBlob)rkrar r rrmwszFetchBlobs..r )namesr r r FetchBlobsosrcCs.tjt|}t|tr*tdjt||S)zFetches a blob from the workspace. Inputs: name: the name of the blob - a string or a BlobReference Returns: Fetched blob (numpy array or string) if successful z'Use FetchInt8Blob to fetch Int8 Blob {})r fetch_blobrxr3tuple TypeErrorr/)rar#r r rrzs   rcCstjj}|j|jS)N)r rBrCrKto_torch)rarr r r FetchTorchsr Int8Tensordatascale zero_pointcCs2tjt|}t|ts*tdjt|t|S)amFetches 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 quantization scale zero_point: int, fake quantization offset z9You are not fetching an Int8Blob {}. Please use FetchBlob)r rrxr3rrnr/r)rar#r r r FetchInt8Blobs   rcCsXtjt|}t|ts*tdjt|t|}|jj t j t |j j t j|jS)zFetches an Int8 blob from the workspace and return its real value representation. Inputs: name: the name of the Int8 blob - a string or a BlobReference Returns: real value representation of int8 numpy array z9You are not fetching an Int8Blob {}. Please use FetchBlob)r rrxr3rrnr/rrastyper Zint32intrZfloat32r)rar#Z int8_blobr r rFetchInt8BlobRealVals  rcCs.|j|}t|ts&tdjt|t|S)amFetches 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 quantization scale zero_point: int, fake quantization offset z:You are not fetching an Int8Blob {}. Please use fetch_blob)rr3rrnr/rxr)rrar#r r r_Workspace_fetch_int8_blobs   rcCs0tj}tjt|jd|j}|j||S)aApply a Transform to a NetDef protobuf object, and returns the new transformed NetDef. Inputs: transform_key: the name of the transform, as it is stored in the registry net: a NetDef protobuf object Returns: Transformed NetDef protobuf object. zutf-8)rr{r Zapply_transformr,encoderro) transform_keyrtransformed_nettransformed_strr r rApplyTransforms    rc Ks|d|kr|dnd}d|kr$|dnd}d|kr8|dnd}tj}tjt|jd|j|j||t|}|j||S)aApply a Transform to a NetDef protobuf object, and returns the new transformed NetDef, only if it runs faster than the original. The runs are performed on the current active workspace (gWorkspace). You should initialize that workspace before making a call to this function. Inputs: transform_key: the name of the transform, as it is stored in the registry net: a NetDef protobuf object init_net: The net to initialize the workspace. warmup_runs (optional): Determines how many times the net is run before testing. Will be 5 by default. main_runs (optional): Determines how many times the net is run during testing. Will be 10 by default. improvement_threshold (optional): Determines the factor which the new net needs to be faster in order to replace the old. Will be 1.01 by default. Returns: Either a Transformed NetDef protobuf object, or the original netdef. warmup_runs main_runs improvement_thresholdg)\(?zutf-8) rr{r Zapply_transform_if_fasterr,rrfloatro) rrrIr\rrrrrr r rApplyTransformIfFasters   rcCstjS)z>Return the current namescope string. To be used to fetch blobs)rZCurrentNameScoper r r r GetNameScope src@s8eZdZdZddZddZddZdd Zd d Zd S) _BlobDictz>Provides python dict compatible way to do fetching and feedingcCst|S)N)r)selfkeyr r r __getitem__sz_BlobDict.__getitem__cCs t||S)N)r)rrvaluer r r __setitem__sz_BlobDict.__setitem__cCs ttjS)N)lenr rK)rr r r__len__sz_BlobDict.__len__cCs tjjS)N)r rK__iter__)rr r rrsz_BlobDict.__iter__cCs tj|S)N)r has_blob)ritemr r r __contains__ sz_BlobDict.__contains__N) r7 __module__ __qualname____doc__rrrrrr r r rrs rZ_CAFFE2_IMMEDIATErcCstS)N)_immediate_moder r r r IsImmediate@srccs"t}t|ddVt|dS)NT)CurrentWorkspaceSwitchWorkspace)Zworkspace_namerCr r rWorkspaceGuardDs rc CsHtr tdatttjattWdQRX|rr.)Zi_knowr r rStartImmediateLs !rc Cs:ts dStt tWdQRXtjtdadadS)zStops an immediate mode run.NrF)rrrr>shutilrmtreerrr r r rr~s  rc CstttSQRXdS)N)rrBlobsr r r rImmediateBlobss rc Cs ttt|WdQRXdS)N)rrrM)rPr r rRunOperatorImmediates rc Ostt t||SQRXdS)N)rrr)r)r\r r rFetchImmediates rc Ostt t||SQRXdS)N)rrr)r)r\r r r FeedImmediates rcCst|j|jt|t||S)N)r@Z _create_netrDrEr9)rrrFr r r._Workspace_create_net_with_exception_intercepts rcCst|dr|j}t|tjr,|j|jSt|tjrRt|j |j t ||jSt|tj rl|j |jStdjt|dS)Nrz*Don't know how to do Workspace.run() on {})r4rr3rZPlanDefZ _run_planrr{r@Z_run_netrDrEZ OperatorDefZ _run_operatorr5r/r6)rr8r r r_Workspace_runs     rcCst|tjkrtj|}t|tjkr>|jjdkr>|j tj }|dkrNt j }|r|j tjkr|jtjdkrtjddj|djt|jt|}|dk r|j|j||S|j|j|SdS)NZSUZfloat64z.CUDA operators do not support 64-bit doubles, z7please use arr.astype(np.float32) or np.int32 for ints.z Blob: {}z type: {}zeCUDA operators do not support 64-bit doubles, please use arr.astype(np.float32) or np.int32 for ints.)r6rZ TensorProtorZCaffe2TensorToNumpyArrayr ZndarrayZdtypekindrobjectrZCurrentDeviceScopeZ device_typeCUDArXrYr/r,rxr?feed)rrar}r~r r rr|s   r|cCs|jt|dS)N)Z _remove_blobr,)rblobr r r_Workspace_remove_blobsrcCsvt|jdkrZt|jdkrZddl}t||jrZ|dks@td|jj|}|j |dS|dk rjt |}|j ||S)NTensortorchrz5device_option doesn't make sense with PyTorch tensorsT) r6r7rrr3rrn_C_tensor_impl_raw_handle_wrap_tensor_implr9Z_feed)rargr~rhandler r r _Blob_feeds    rcCsddl}|j}|jj|S)z PyTorch tensor interop (TensorCPU methods) Can be accessed as: workspace.Workspace.current.blobs['foo'].tensor().to_torch() rN)rrrr)Ztensorrrr r r_Tensor_to_torchsrcCs|jstd|jjS)NzBlob has to be a tensor)Z is_tensor RuntimeErrorZ as_tensorr)rr r r_Blob_to_torchsr)NN)N)FN)rF)NFN)N)F)F)N)N) collections contextlibZgoogle.protobuf.messagermultiprocessingrr:rloggingZnumpyr Z past.builtinsrrrrZ caffe2.protorZ caffe2.pythonrrZcaffe2.python.lazyr Z!caffe2.python._import_c_extensionrdZ_import_c_extensionr getLoggerr7rXrKrZ reset_blobZ ResetBlobr?Z CreateBlobZcurrent_workspacerZdeserialize_blobZDeserializeBlobZ global_initZ GlobalInitrZHasBlobZregistered_operatorsZRegisteredOperatorsZserialize_blobZ SerializeBlobZswitch_workspacerr*Z RootFolderZ workspacesZ WorkspacesZ benchmark_netZ BenchmarkNetZbenchmark_net_onceZBenchmarkNetOnceZ get_statsZGetStatsZcreate_offline_tensorZCreateOfflineTensordictrVZis_asanZ has_fbgemmZhas_cuda_supportZhas_hip_supportZhas_gpu_supportrZ GpuDeviceTypeZnum_cuda_devicesZNumCudaDevicesZ NumGpuDevicesZget_cuda_versionZGetCUDAVersionZget_cudnn_versionZGetCuDNNVersionrZget_device_propertiesZGetDevicePropertiesZget_gpu_memory_infoZGetGPUMemoryInfoZHIPZnum_hip_devicesZget_hip_versionZ GetHIPVersionZis_numa_enabledZ IsNUMAEnabledZget_num_numa_nodesZGetNumNUMANodesZget_blob_numa_nodeZGetBlobNUMANodeZget_blob_size_bytesZGetBlobSizeBytesrr&r2r9r>rGrHrLrMrNrRrSr@r_rbrirjrurwrxr`rErrrr namedtuplerrrrrBZfetch_int8_blobrrrrrrrrrcontextmanagerrrrrrrrrrr|rrArunZ feed_blobZ remove_blobrZBlobrrZ TensorCPUrrr r r rs            '  + 2