@Jiang_He  I have the same concern. If an input tensor is not contiguous, using THCudaTensor_data may lead to the wrong data. In the new tutorial 18, the check is always performed:

#define CHECK_CONTIGUOUS(x) AT_ASSERT(x.is_contiguous(), #x " must be contiguous")