MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / place

Function place

python/paddle/pir/math_op_patch.py:255–263  ·  view source on GitHub ↗

Tensor don't have 'place' interface in static graph mode But this interface can greatly facilitate dy2static. So we give a warning here and return None.

(self)

Source from the content-addressed store, hash-verified

253
254 @property
255 def place(self):
256 """
257 Tensor don't have 'place' interface in static graph mode
258 But this interface can greatly facilitate dy2static.
259 So we give a warning here and return None.
260 """
261 warnings.warn(
262 "Tensor do not have 'place' interface for pir graph mode, try not to use it. None will be returned."
263 )
264
265 @property
266 def device(self):

Callers 11

ResizeAndAllocateMethod · 0.50
RecordStreamMethod · 0.50
is_cpuMethod · 0.50
is_gpuMethod · 0.50
is_gpu_pinnedMethod · 0.50
is_xpuMethod · 0.50
is_xpu_pinnedMethod · 0.50
is_custom_deviceMethod · 0.50
mutable_dataMethod · 0.50
copy_Method · 0.50

Calls 1

warnMethod · 0.45

Tested by

no test coverage detected