megatron.core.utils.assert_viewless_tensor#

megatron.core.utils.assert_viewless_tensor(tensor, extra_msg=None)#

Assert that a tensor is not a view (i.e., its ‘._base’ field is not set).