Skip to content

Commit 7310d24

Browse files
committed
Update base for Update on "gemma3 e2e runner on cuda"
This diff introduces e2e runner for gemma3 model on cuda delegating using AOTI library, which is guarded by CI. Also other necessary infrastructure updates for building and running the `gemma3 e2e runner` on CUDA devices. Differential Revision: [D85087532](https://our.internmc.facebook.com/intern/diff/D85087532/) [ghstack-poisoned]
1 parent a4cf57a commit 7310d24

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

backends/cuda/runtime/shims/memory.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,10 +234,9 @@ AOTITorchError aoti_torch_empty_strided(
234234
}
235235
// For each dimension, add stride[i] * (size[i] - 1)
236236
// This gives us the maximum offset in that dimension
237-
int64_t stride_i = (strides_ptr != nullptr) ? strides_ptr[i] : 0;
237+
int64_t stride_i = (strides_ptr != nullptr) ? strides_ptr[i] : 1;
238238
if (strides_ptr == nullptr) {
239239
// Calculate contiguous stride if not provided
240-
stride_i = 1;
241240
for (int64_t j = i + 1; j < ndim; j++) {
242241
stride_i *= sizes_ptr[j];
243242
}

0 commit comments

Comments
 (0)