  Phase transition of the classical Ising model on the Sierpi\'{n}ski carpet,
which has the fractal dimension $\log_3^{~} 8 \approx 1.8927$, is studied by an
adapted variant of the higher-order tensor renormalization group method. The
second-order phase transition is observed at the critical temperature $T_{\rm
c}^{~} \approx 1.478$. Position dependence of local functions is studied
through impurity tensors inserted at different locations on the fractal
lattice. The critical exponent $\beta$ associated with the local magnetization
varies by two orders of magnitude, depending on lattice locations, whereas
$T_{\rm c}^{~}$ is not affected. Furthermore, we employ automatic
differentiation to accurately and efficiently compute the average spontaneous
magnetization per site as a first derivative of free energy with respect to the
external field, yielding the global critical exponent of $\beta \approx 0.135$.
