Learn Before
Concept

Cross-Device Tensor Operations Constraint

Whenever a mathematical operation involves multiple tensors, such as calculating the sum of two tensors, it is required that all participating arguments live on the exact same hardware device. If an attempt is made to compute an operation across different devices—such as adding a CPU tensor to a GPU tensor—the framework will fail, because it lacks the necessary information to decide where the computation should be executed or where the resulting tensor should be stored in memory.

0

1

Updated 2026-05-09

Contributors are:

Who are from:

Tags

D2L

Dive into Deep Learning @ D2L