Skip to content

Commit 1036f6d

Browse files
Revert "[ROCm] Bump AOTriton to 0.10b (#156290)"
This reverts commit 34d8e64. Reverted #156290 on behalf of https://github.com/atalman due to failing multiple internal tests ([comment](#156290 (comment)))
1 parent b4442f4 commit 1036f6d

File tree

7 files changed

+241
-368
lines changed

7 files changed

+241
-368
lines changed

aten/src/ATen/native/transformers/cuda/attention.cu

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,10 +1113,8 @@ _flash_attention_forward(
11131113
std::optional<Tensor> alibi_slopes = _alibi_slopes;
11141114
const float softcap = 0.0;
11151115

1116-
#ifndef USE_ROCM // ROCM backend accepts std::optional for window_size_left/right directly.
1117-
const int non_null_window_left = window_size_left.value_or(-1);
1118-
const int non_null_window_right = window_size_right.value_or(-1);
1119-
#endif
1116+
const int non_null_window_left = window_size_left.has_value() ? window_size_left.value() : -1;
1117+
const int non_null_window_right = window_size_right.has_value() ? window_size_right.value() : -1;
11201118

11211119
// We are going to have two paths:
11221120
// 1. The standard MHA path for dense tensors
@@ -1153,13 +1151,8 @@ _flash_attention_forward(
11531151
softmax_scale,
11541152
false /*zero_tensors*/,
11551153
is_causal,
1156-
#ifdef USE_ROCM
1157-
window_size_left,
1158-
window_size_right,
1159-
#else
11601154
non_null_window_left,
11611155
non_null_window_right,
1162-
#endif
11631156
softcap,
11641157
return_debug_mask,
11651158
std::nullopt /*gen_*/);
@@ -1182,13 +1175,8 @@ _flash_attention_forward(
11821175
dropout_p,
11831176
softmax_scale,
11841177
is_causal,
1185-
#ifdef USE_ROCM
1186-
window_size_left,
1187-
window_size_right,
1188-
#else
11891178
non_null_window_left,
11901179
non_null_window_right,
1191-
#endif
11921180
softcap,
11931181
return_debug_mask, /*return_softmax (this is used for testing)*/
11941182
std::nullopt);

aten/src/ATen/native/transformers/cuda/attention_backward.cu

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,8 @@ std::tuple<Tensor, Tensor, Tensor> _flash_attention_backward(
8787
auto contiguous_grad_out = grad_out.contiguous();
8888
auto contiguous_out = out.contiguous();
8989

90-
#ifndef USE_ROCM // ROCM backend accepts std::optional for window_size_left/right directly.
9190
const int non_null_window_left = window_size_left.has_value() ? window_size_left.value() : -1;
9291
const int non_null_window_right = window_size_right.has_value() ? window_size_right.value() : -1;
93-
#endif
9492

9593
std::optional<at::Tensor> dq{std::nullopt};
9694
std::optional<at::Tensor> dk{std::nullopt};
@@ -138,13 +136,8 @@ std::tuple<Tensor, Tensor, Tensor> _flash_attention_backward(
138136
softmax_scale,
139137
false /*zero_tensors*/,
140138
is_causal,
141-
#ifdef USE_ROCM
142-
window_size_left,
143-
window_size_right,
144-
#else
145139
non_null_window_left,
146140
non_null_window_right,
147-
#endif
148141
softcap,
149142
determinisitic,
150143
philox_seed,
@@ -166,13 +159,8 @@ std::tuple<Tensor, Tensor, Tensor> _flash_attention_backward(
166159
dropout_p,
167160
softmax_scale,
168161
is_causal,
169-
#ifdef USE_ROCM
170-
window_size_left,
171-
window_size_right,
172-
#else
173162
non_null_window_left,
174163
non_null_window_right,
175-
#endif
176164
softcap,
177165
determinisitic,
178166
philox_seed,

0 commit comments

Comments
 (0)