We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b8b2ea commit 33f49daCopy full SHA for 33f49da
core/runtime/execute_engine.cpp
@@ -118,6 +118,9 @@ void setup_input_tensors(
118
LOG_DEBUG("Input Name: " << name << " Shape: " << dims << " isShapeInferenceIO: " << is_shape_tensor);
119
120
if (is_shape_tensor) {
121
+ // Shape tensor inputs are casted to int64 explicitly.
122
+ // Refer to
123
+ // https://github.com/NVIDIA/TensorRT/blob/d2f4ef789a9a6ffdf37b55c3f81b486225f6b380/samples/common/sampleInference.cpp#L435
124
auto input_cpu = inputs[i].clone().contiguous().cpu().to(torch::kInt64);
125
std::vector<int64_t> inputs_cpu_vec(
126
input_cpu.data_ptr<int64_t>(), input_cpu.data_ptr<int64_t>() + input_cpu.numel());
0 commit comments