Commit ad32f42
[CUDA] Fix cuda 12.8 build warnings (#26136)
Fix build warnings using cuda 12.8 in Linux like the following:
```
<command-line>: error: "_FORTIFY_SOURCE" redefined [-Werror]
gather_block_quantized.cc:95:40: warning: comparison of integer expressions of different signedness: ‘int64_t’ {aka ‘long int’} and ‘long unsigned int’ [-Wsign-compare]
95 | for (int64_t i = gather_axis_ + 1; i < data_rank; ++i) {
attention_op_test.cc:304:85: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<float>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
304 | } else if (batch_size * q_num_heads * q_sequence_length * total_sequence_length == attn_mask.size()) {
/cast_op_test.cc:1487:24: warning: comparison of integer expressions of different signedness: ‘size_t’ {aka ‘long unsigned int’} and ‘int’ [-Wsign-compare]
1487 | for (size_t i = 0; i < num_pairs; ++i) {
| ~~^~~~~~~~~~~
```
---------
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>1 parent 72e56e7 commit ad32f42
File tree
5 files changed
+25
-15
lines changed- onnxruntime
- contrib_ops/cuda/quantization
- test/providers/cpu
- llm
- tensor
- tools
- ci_build
- python/util
5 files changed
+25
-15
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
95 | | - | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
220 | 220 | | |
221 | 221 | | |
222 | 222 | | |
223 | | - | |
224 | | - | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
225 | 226 | | |
226 | | - | |
| 227 | + | |
227 | 228 | | |
228 | 229 | | |
229 | 230 | | |
| |||
298 | 299 | | |
299 | 300 | | |
300 | 301 | | |
301 | | - | |
302 | | - | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
303 | 305 | | |
304 | | - | |
| 306 | + | |
305 | 307 | | |
306 | 308 | | |
307 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1477 | 1477 | | |
1478 | 1478 | | |
1479 | 1479 | | |
1480 | | - | |
| 1480 | + | |
1481 | 1481 | | |
1482 | 1482 | | |
1483 | 1483 | | |
| |||
1489 | 1489 | | |
1490 | 1490 | | |
1491 | 1491 | | |
1492 | | - | |
| 1492 | + | |
1493 | 1493 | | |
1494 | 1494 | | |
1495 | 1495 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1183 | 1183 | | |
1184 | 1184 | | |
1185 | 1185 | | |
1186 | | - | |
| 1186 | + | |
| 1187 | + | |
1187 | 1188 | | |
1188 | 1189 | | |
1189 | 1190 | | |
| |||
1194 | 1195 | | |
1195 | 1196 | | |
1196 | 1197 | | |
1197 | | - | |
| 1198 | + | |
| 1199 | + | |
1198 | 1200 | | |
1199 | 1201 | | |
1200 | 1202 | | |
| |||
1209 | 1211 | | |
1210 | 1212 | | |
1211 | 1213 | | |
1212 | | - | |
| 1214 | + | |
| 1215 | + | |
1213 | 1216 | | |
1214 | 1217 | | |
1215 | 1218 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
362 | 362 | | |
363 | 363 | | |
364 | 364 | | |
365 | | - | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
366 | 371 | | |
367 | 372 | | |
368 | 373 | | |
| |||
0 commit comments