You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Consider hardcoding a 64-bit offset type for DeviceTransform #8805
cub::DeviceTransform currently uses a I32 or I64 as offset type, depending on the offset type provided by the user. Using just I64 would make the implementation simpler and should prevent 32-bit overflow bugs.
This performance difference between the two offset types was benchmarked a while ago on Hopper by @elstehle in #2714 and we saw differences of 0 - 3%. Several optimizations and changes have been made to DeviceTransform in the meantime, so I would suggest to revisit the issue, especially also benchmarking on Blackwell.
Hopper results indicate that moving to 64-bit offset type is causing a bit of noise, but no systematic change in performance. We should also look at results for Blackwell and maybe for Ampere.
int32 vs int64 (--threshold-diff=0.01)
# mul
## [0] NVIDIA H200 NVL
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|-----------|---------|----------|
| I8 | I64 | 2^20 | 5.466 us | 5.36% | 5.379 us | 3.94% | -0.087 us | -1.59% | 🔵 SAME |
| I16 | I32 | 2^20 | 5.955 us | 3.82% | 6.113 us | 4.01% | 0.157 us | 2.64% | 🔵 SAME |
| I16 | I32 | 2^24 | 22.464 us | 2.74% | 22.750 us | 2.51% | 0.286 us | 1.27% | 🔵 SAME |
| I16 | I64 | 2^16 | 4.567 us | 4.34% | 4.517 us | 4.68% | -0.050 us | -1.08% | 🔵 SAME |
| I128 | I64 | 2^16 | 5.126 us | 4.58% | 5.065 us | 4.58% | -0.061 us | -1.20% | 🔵 SAME |
# add
## [0] NVIDIA H200 NVL
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|-----------|---------|----------|
| I16 | I32 | 2^16 | 4.455 us | 4.33% | 4.402 us | 4.47% | -0.053 us | -1.20% | 🔵 SAME |
| I16 | I32 | 2^20 | 6.533 us | 4.94% | 6.436 us | 5.32% | -0.097 us | -1.49% | 🔵 SAME |
| I16 | I64 | 2^16 | 4.374 us | 5.10% | 4.309 us | 4.36% | -0.064 us | -1.47% | 🔵 SAME |
| F64 | I32 | 2^24 | 110.752 us | 0.56% | 106.663 us | 4.58% | -4.089 us | -3.69% | 🟢 FAST |
# triad
## [0] NVIDIA H200 NVL
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|-----------|---------|----------|
| I8 | I64 | 2^16 | 4.477 us | 4.84% | 4.420 us | 4.17% | -0.057 us | -1.27% | 🔵 SAME |
| I16 | I32 | 2^16 | 4.600 us | 4.76% | 4.543 us | 4.92% | -0.057 us | -1.24% | 🔵 SAME |
| I16 | I64 | 2^16 | 4.561 us | 5.11% | 4.505 us | 4.99% | -0.056 us | -1.23% | 🔵 SAME |
| F32 | I32 | 2^20 | 9.313 us | 6.26% | 8.957 us | 2.29% | -0.357 us | -3.83% | 🟢 FAST |
| I128 | I64 | 2^20 | 18.749 us | 4.47% | 18.974 us | 4.79% | 0.225 us | 1.20% | 🔵 SAME |
# nstream
## [0] NVIDIA H200 NVL
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|-----------|---------|----------|
| I8 | I64 | 2^28 | 264.113 us | 4.17% | 260.971 us | 3.54% | -3.142 us | -1.19% | 🔵 SAME |
| I16 | I32 | 2^16 | 4.594 us | 4.37% | 4.546 us | 4.52% | -0.048 us | -1.04% | 🔵 SAME |
| F32 | I64 | 2^16 | 4.974 us | 4.75% | 4.919 us | 4.65% | -0.055 us | -1.11% | 🔵 SAME |
| F32 | I64 | 2^20 | 9.963 us | 1.47% | 10.443 us | 6.24% | 0.480 us | 4.82% | 🔴 SLOW |
| F64 | I64 | 2^16 | 5.471 us | 4.29% | 5.395 us | 4.82% | -0.076 us | -1.39% | 🔵 SAME |
| I128 | I64 | 2^20 | 23.208 us | 3.57% | 23.476 us | 4.68% | 0.268 us | 1.15% | 🔵 SAME |
int64 vs uint64 (--threshold-diff=0.01)
# mul
## [0] NVIDIA H200 NVL
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|----------|---------|----------|
| I8 | I32 | 2^16 | 4.320 us | 4.17% | 4.370 us | 4.98% | 0.050 us | 1.15% | 🔵 SAME |
| I8 | I64 | 2^16 | 4.458 us | 4.23% | 4.506 us | 5.19% | 0.048 us | 1.07% | 🔵 SAME |
| I16 | I32 | 2^16 | 4.565 us | 4.39% | 4.634 us | 3.88% | 0.068 us | 1.50% | 🔵 SAME |
| F32 | I32 | 2^20 | 7.144 us | 5.21% | 7.360 us | 5.02% | 0.215 us | 3.02% | 🔵 SAME |
| I128 | I64 | 2^16 | 5.065 us | 4.58% | 5.129 us | 4.28% | 0.064 us | 1.27% | 🔵 SAME |
# add
## [0] NVIDIA H200 NVL
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|-----------|---------|----------|
| I8 | I64 | 2^28 | 211.773 us | 3.79% | 209.310 us | 3.66% | -2.463 us | -1.16% | 🔵 SAME |
| I16 | I32 | 2^20 | 6.436 us | 5.32% | 6.518 us | 4.83% | 0.083 us | 1.28% | 🔵 SAME |
| I16 | I64 | 2^16 | 4.309 us | 4.36% | 4.389 us | 5.31% | 0.080 us | 1.85% | 🔵 SAME |
| F32 | I32 | 2^20 | 8.762 us | 3.16% | 9.186 us | 6.66% | 0.423 us | 4.83% | 🔴 SLOW |
| F64 | I32 | 2^24 | 106.663 us | 4.58% | 110.832 us | 0.55% | 4.169 us | 3.91% | 🔴 SLOW |
| I128 | I64 | 2^20 | 18.730 us | 4.92% | 18.530 us | 4.62% | -0.200 us | -1.07% | 🔵 SAME |
# triad
## [0] NVIDIA H200 NVL
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|-----------|---------|----------|
| I8 | I64 | 2^16 | 4.420 us | 4.17% | 4.466 us | 4.57% | 0.046 us | 1.04% | 🔵 SAME |
| I16 | I32 | 2^16 | 4.543 us | 4.92% | 4.603 us | 4.40% | 0.060 us | 1.32% | 🔵 SAME |
| I16 | I32 | 2^20 | 6.708 us | 4.66% | 6.807 us | 4.58% | 0.099 us | 1.48% | 🔵 SAME |
| I16 | I64 | 2^16 | 4.505 us | 4.99% | 4.551 us | 4.76% | 0.046 us | 1.02% | 🔵 SAME |
| F32 | I32 | 2^20 | 8.957 us | 2.29% | 9.072 us | 5.85% | 0.116 us | 1.29% | 🔵 SAME |
| F32 | I32 | 2^24 | 56.954 us | 3.67% | 55.484 us | 1.51% | -1.469 us | -2.58% | 🟢 FAST |
| F32 | I64 | 2^16 | 4.811 us | 4.70% | 4.859 us | 5.44% | 0.048 us | 1.00% | 🔵 SAME |
| F32 | I64 | 2^20 | 8.584 us | 4.10% | 8.480 us | 4.09% | -0.104 us | -1.21% | 🔵 SAME |
| F64 | I64 | 2^16 | 5.165 us | 5.26% | 5.219 us | 4.94% | 0.054 us | 1.05% | 🔵 SAME |
# nstream
## [0] NVIDIA H200 NVL
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|-----------|---------|----------|
| I8 | I32 | 2^16 | 4.476 us | 4.31% | 4.536 us | 4.50% | 0.060 us | 1.35% | 🔵 SAME |
| I8 | I64 | 2^16 | 4.450 us | 4.31% | 4.498 us | 4.63% | 0.048 us | 1.08% | 🔵 SAME |
| I16 | I64 | 2^16 | 4.458 us | 4.08% | 4.510 us | 4.73% | 0.052 us | 1.16% | 🔵 SAME |
| F32 | I32 | 2^16 | 4.867 us | 3.77% | 4.929 us | 4.17% | 0.062 us | 1.27% | 🔵 SAME |
| F32 | I64 | 2^20 | 10.443 us | 6.24% | 9.963 us | 1.34% | -0.480 us | -4.59% | 🟢 FAST |
| F64 | I32 | 2^24 | 139.172 us | 4.11% | 144.523 us | 0.69% | 5.351 us | 3.84% | 🔴 SLOW |
int32 vs int64 (--threshold-diff=0.01)
Tiny regression on a 4/200 runs (I reran the benchmarks and compared again, and it was the same 4 benchmarks again):
# mul
## [0] NVIDIA B200
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|-----------|---------|----------|
| I8 | I32 | 2^28 | 116.430 us | 0.54% | 117.871 us | 0.70% | 1.442 us | 1.24% | 🔴 SLOW |
| F64 | I32 | 2^16 | 6.499 us | 9.49% | 6.426 us | 8.41% | -0.073 us | -1.13% | 🔵 SAME |
# add
## [0] NVIDIA B200
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|-----------|---------|----------|
| I16 | I32 | 2^24 | 23.029 us | 3.38% | 23.454 us | 4.02% | 0.425 us | 1.84% | 🔵 SAME |
| F64 | I64 | 2^16 | 6.888 us | 11.97% | 6.816 us | 11.94% | -0.072 us | -1.05% | 🔵 SAME |
# triad
## [0] NVIDIA B200
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|----------|---------|----------|
| I8 | I32 | 2^24 | 17.835 us | 4.69% | 18.115 us | 3.35% | 0.280 us | 1.57% | 🔵 SAME |
| I8 | I32 | 2^28 | 153.406 us | 0.32% | 155.685 us | 0.25% | 2.280 us | 1.49% | 🔴 SLOW |
| F32 | I32 | 2^16 | 6.557 us | 10.30% | 6.691 us | 10.96% | 0.133 us | 2.03% | 🔵 SAME |
| I128 | I32 | 2^16 | 7.752 us | 10.08% | 7.872 us | 9.63% | 0.119 us | 1.54% | 🔵 SAME |
# nstream
## [0] NVIDIA B200
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|----------|---------|----------|
| I8 | I32 | 2^28 | 208.966 us | 0.18% | 212.496 us | 0.36% | 3.531 us | 1.69% | 🔴 SLOW |
| I16 | I32 | 2^28 | 317.133 us | 0.23% | 322.522 us | 0.29% | 5.389 us | 1.70% | 🔴 SLOW |
int64 vs uint64 (--threshold-diff=0.01):
I am genuinely surprised that the signed integer wins this much:
# mul
## [0] NVIDIA B200
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|-----------|---------|----------|
| I8 | I32 | 2^16 | 6.429 us | 7.71% | 6.519 us | 8.34% | 0.090 us | 1.41% | 🔵 SAME |
| I8 | I32 | 2^20 | 7.836 us | 6.57% | 7.361 us | 5.97% | -0.475 us | -6.06% | 🟢 FAST |
| I8 | I32 | 2^24 | 14.629 us | 3.32% | 15.302 us | 1.45% | 0.673 us | 4.60% | 🔴 SLOW |
| I8 | I64 | 2^16 | 6.376 us | 6.82% | 7.170 us | 0.64% | 0.793 us | 12.44% | 🔴 SLOW |
| I8 | I64 | 2^20 | 7.811 us | 6.73% | 7.163 us | 2.70% | -0.649 us | -8.30% | 🟢 FAST |
| I8 | I64 | 2^24 | 14.579 us | 3.06% | 15.350 us | 0.50% | 0.771 us | 5.29% | 🔴 SLOW |
| I16 | I32 | 2^16 | 6.481 us | 8.45% | 7.165 us | 0.65% | 0.684 us | 10.55% | 🔴 SLOW |
| I16 | I32 | 2^20 | 7.884 us | 6.86% | 7.585 us | 10.99% | -0.298 us | -3.78% | 🔵 SAME |
| I16 | I32 | 2^24 | 18.130 us | 2.84% | 17.573 us | 3.38% | -0.557 us | -3.07% | 🟢 FAST |
| I16 | I64 | 2^16 | 6.541 us | 9.15% | 7.163 us | 0.88% | 0.622 us | 9.51% | 🔴 SLOW |
| I16 | I64 | 2^20 | 7.891 us | 6.68% | 7.641 us | 11.51% | -0.250 us | -3.17% | 🔵 SAME |
| I16 | I64 | 2^24 | 18.164 us | 2.80% | 17.658 us | 4.00% | -0.506 us | -2.79% | 🔵 SAME |
| F32 | I32 | 2^16 | 6.438 us | 8.03% | 6.563 us | 8.42% | 0.125 us | 1.93% | 🔵 SAME |
| F32 | I32 | 2^20 | 8.389 us | 4.88% | 8.525 us | 5.58% | 0.136 us | 1.62% | 🔵 SAME |
| F32 | I64 | 2^16 | 6.443 us | 8.00% | 7.165 us | 0.71% | 0.722 us | 11.20% | 🔴 SLOW |
| F32 | I64 | 2^20 | 8.366 us | 4.63% | 9.210 us | 0.63% | 0.845 us | 10.10% | 🔴 SLOW |
| F32 | I64 | 2^24 | 26.866 us | 1.95% | 27.602 us | 1.22% | 0.736 us | 2.74% | 🔴 SLOW |
| F64 | I32 | 2^16 | 6.426 us | 8.41% | 7.173 us | 1.84% | 0.747 us | 11.63% | 🔴 SLOW |
| F64 | I32 | 2^20 | 10.048 us | 4.40% | 9.362 us | 6.04% | -0.687 us | -6.83% | 🟢 FAST |
| F64 | I64 | 2^16 | 6.577 us | 10.72% | 7.162 us | 0.67% | 0.585 us | 8.89% | 🔴 SLOW |
| F64 | I64 | 2^20 | 10.051 us | 4.21% | 9.261 us | 4.02% | -0.790 us | -7.86% | 🟢 FAST |
| I128 | I32 | 2^20 | 12.178 us | 3.99% | 12.426 us | 8.18% | 0.248 us | 2.04% | 🔵 SAME |
| I128 | I64 | 2^20 | 12.306 us | 3.84% | 12.704 us | 7.34% | 0.398 us | 3.23% | 🔵 SAME |
# add
## [0] NVIDIA B200
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|-----------|---------|----------|
| I8 | I32 | 2^16 | 6.681 us | 8.29% | 7.162 us | 1.17% | 0.481 us | 7.20% | 🔴 SLOW |
| I8 | I32 | 2^20 | 7.925 us | 6.51% | 7.311 us | 7.52% | -0.614 us | -7.75% | 🟢 FAST |
| I8 | I32 | 2^24 | 16.701 us | 2.93% | 17.403 us | 0.37% | 0.702 us | 4.20% | 🔴 SLOW |
| I8 | I64 | 2^16 | 6.391 us | 6.98% | 6.799 us | 7.78% | 0.408 us | 6.38% | 🔵 SAME |
| I8 | I64 | 2^20 | 7.973 us | 5.73% | 7.335 us | 6.72% | -0.637 us | -7.99% | 🟢 FAST |
| I8 | I64 | 2^24 | 16.646 us | 2.89% | 17.238 us | 2.26% | 0.592 us | 3.56% | 🔴 SLOW |
| I16 | I32 | 2^16 | 6.423 us | 9.04% | 7.163 us | 0.69% | 0.740 us | 11.52% | 🔴 SLOW |
| I16 | I32 | 2^20 | 8.363 us | 4.76% | 9.216 us | 0.52% | 0.852 us | 10.19% | 🔴 SLOW |
| I16 | I64 | 2^16 | 6.447 us | 8.69% | 7.166 us | 0.78% | 0.719 us | 11.15% | 🔴 SLOW |
| I16 | I64 | 2^20 | 8.358 us | 4.86% | 9.094 us | 5.33% | 0.736 us | 8.80% | 🔴 SLOW |
| F32 | I32 | 2^16 | 6.595 us | 10.65% | 7.158 us | 0.81% | 0.562 us | 8.53% | 🔴 SLOW |
| F32 | I32 | 2^20 | 9.864 us | 7.27% | 9.197 us | 1.26% | -0.667 us | -6.76% | 🟢 FAST |
| F32 | I64 | 2^16 | 6.519 us | 9.96% | 7.157 us | 0.82% | 0.638 us | 9.79% | 🔴 SLOW |
| F32 | I64 | 2^20 | 9.849 us | 6.77% | 9.201 us | 0.77% | -0.648 us | -6.58% | 🟢 FAST |
| F64 | I32 | 2^16 | 6.785 us | 12.21% | 7.159 us | 1.63% | 0.374 us | 5.52% | 🔴 SLOW |
| F64 | I32 | 2^20 | 11.368 us | 8.01% | 11.240 us | 0.43% | -0.128 us | -1.13% | 🟢 FAST |
| F64 | I64 | 2^16 | 6.816 us | 11.94% | 7.153 us | 0.90% | 0.337 us | 4.95% | 🔴 SLOW |
| F64 | I64 | 2^20 | 11.526 us | 7.55% | 11.249 us | 1.21% | -0.277 us | -2.40% | 🟢 FAST |
| I128 | I32 | 2^16 | 7.956 us | 7.87% | 7.453 us | 9.55% | -0.503 us | -6.32% | 🔵 SAME |
| I128 | I32 | 2^20 | 14.683 us | 4.10% | 15.345 us | 0.35% | 0.661 us | 4.50% | 🔴 SLOW |
| I128 | I64 | 2^16 | 7.997 us | 5.47% | 7.161 us | 2.26% | -0.836 us | -10.45% | 🟢 FAST |
| I128 | I64 | 2^20 | 14.675 us | 4.33% | 15.347 us | 0.53% | 0.671 us | 4.58% | 🔴 SLOW |
# triad
## [0] NVIDIA B200
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|-----------|---------|----------|
| I8 | I32 | 2^16 | 6.671 us | 10.07% | 7.162 us | 1.83% | 0.491 us | 7.36% | 🔴 SLOW |
| I8 | I32 | 2^20 | 7.991 us | 5.48% | 7.310 us | 7.50% | -0.681 us | -8.53% | 🟢 FAST |
| I8 | I32 | 2^24 | 18.115 us | 3.35% | 17.388 us | 0.45% | -0.727 us | -4.01% | 🟢 FAST |
| I8 | I64 | 2^16 | 6.431 us | 8.52% | 7.172 us | 1.08% | 0.741 us | 11.53% | 🔴 SLOW |
| I8 | I64 | 2^20 | 8.009 us | 5.26% | 7.326 us | 7.90% | -0.683 us | -8.53% | 🟢 FAST |
| I8 | I64 | 2^24 | 17.048 us | 5.13% | 17.389 us | 0.37% | 0.341 us | 2.00% | 🔴 SLOW |
| I16 | I32 | 2^16 | 6.444 us | 8.23% | 7.159 us | 0.81% | 0.715 us | 11.10% | 🔴 SLOW |
| I16 | I32 | 2^20 | 8.424 us | 5.10% | 9.234 us | 2.97% | 0.810 us | 9.62% | 🔴 SLOW |
| I16 | I32 | 2^24 | 24.430 us | 1.68% | 23.991 us | 3.53% | -0.439 us | -1.80% | 🟢 FAST |
| I16 | I64 | 2^16 | 6.379 us | 7.17% | 7.163 us | 0.96% | 0.785 us | 12.30% | 🔴 SLOW |
| I16 | I64 | 2^20 | 8.303 us | 5.24% | 9.034 us | 7.36% | 0.731 us | 8.80% | 🔴 SLOW |
| I16 | I64 | 2^24 | 24.400 us | 1.78% | 23.790 us | 2.89% | -0.610 us | -2.50% | 🟢 FAST |
| F32 | I32 | 2^16 | 6.691 us | 10.96% | 7.153 us | 1.33% | 0.462 us | 6.91% | 🔴 SLOW |
| F32 | I32 | 2^20 | 9.484 us | 9.15% | 9.209 us | 2.92% | -0.275 us | -2.90% | 🔵 SAME |
| F64 | I32 | 2^16 | 7.012 us | 12.45% | 7.169 us | 2.87% | 0.157 us | 2.24% | 🔵 SAME |
| F64 | I32 | 2^20 | 11.508 us | 7.87% | 11.253 us | 0.46% | -0.256 us | -2.22% | 🟢 FAST |
| F64 | I64 | 2^16 | 6.885 us | 12.85% | 7.170 us | 1.65% | 0.285 us | 4.14% | 🔴 SLOW |
| F64 | I64 | 2^20 | 12.115 us | 3.49% | 11.265 us | 1.61% | -0.851 us | -7.02% | 🟢 FAST |
| I128 | I32 | 2^16 | 7.872 us | 9.63% | 7.781 us | 9.76% | -0.091 us | -1.15% | 🔵 SAME |
| I128 | I64 | 2^16 | 7.749 us | 9.23% | 7.168 us | 3.02% | -0.581 us | -7.50% | 🟢 FAST |
| I128 | I64 | 2^20 | 14.771 us | 4.54% | 15.341 us | 0.34% | 0.569 us | 3.85% | 🔴 SLOW |
# nstream
## [0] NVIDIA B200
| T{ct} | OffsetT{ct} | Elements{io} | Ref Time | Ref Noise | Cmp Time | Cmp Noise | Diff | %Diff | Status |
|---------|---------------|----------------|------------|-------------|------------|-------------|-----------|---------|----------|
| I8 | I32 | 2^16 | 6.734 us | 9.30% | 7.168 us | 2.40% | 0.434 us | 6.44% | 🔴 SLOW |
| I8 | I32 | 2^20 | 8.198 us | 6.43% | 8.314 us | 12.34% | 0.116 us | 1.41% | 🔵 SAME |
| I8 | I32 | 2^24 | 20.653 us | 2.41% | 21.384 us | 2.27% | 0.731 us | 3.54% | 🔴 SLOW |
| I8 | I64 | 2^16 | 6.535 us | 9.98% | 7.159 us | 0.83% | 0.624 us | 9.55% | 🔴 SLOW |
| I8 | I64 | 2^20 | 8.131 us | 6.12% | 8.667 us | 10.40% | 0.536 us | 6.60% | 🔴 SLOW |
| I8 | I64 | 2^24 | 20.709 us | 2.03% | 21.506 us | 0.20% | 0.796 us | 3.84% | 🔴 SLOW |
| I16 | I32 | 2^16 | 6.619 us | 10.81% | 7.160 us | 0.90% | 0.541 us | 8.18% | 🔴 SLOW |
| I16 | I32 | 2^20 | 8.392 us | 4.92% | 9.215 us | 1.08% | 0.822 us | 9.80% | 🔴 SLOW |
| I16 | I32 | 2^24 | 28.885 us | 1.51% | 29.696 us | 0.16% | 0.811 us | 2.81% | 🔴 SLOW |
| I16 | I64 | 2^16 | 6.594 us | 11.05% | 7.159 us | 1.06% | 0.565 us | 8.57% | 🔴 SLOW |
| I16 | I64 | 2^20 | 8.352 us | 4.61% | 9.217 us | 0.71% | 0.866 us | 10.36% | 🔴 SLOW |
| I16 | I64 | 2^24 | 28.787 us | 1.44% | 29.688 us | 0.18% | 0.901 us | 3.13% | 🔴 SLOW |
| F32 | I32 | 2^16 | 6.678 us | 11.75% | 7.160 us | 0.86% | 0.482 us | 7.22% | 🔴 SLOW |
| F32 | I32 | 2^20 | 10.321 us | 3.84% | 10.888 us | 7.23% | 0.567 us | 5.49% | 🔴 SLOW |
| F32 | I64 | 2^16 | 6.811 us | 12.80% | 7.156 us | 0.84% | 0.345 us | 5.06% | 🔴 SLOW |
| F32 | I64 | 2^20 | 10.224 us | 4.27% | 10.352 us | 9.92% | 0.129 us | 1.26% | 🔵 SAME |
| F64 | I64 | 2^16 | 7.351 us | 12.57% | 7.143 us | 0.66% | -0.208 us | -2.83% | 🟢 FAST |
| F64 | I64 | 2^20 | 12.455 us | 3.22% | 13.305 us | 0.40% | 0.850 us | 6.83% | 🔴 SLOW |
| I128 | I32 | 2^16 | 8.188 us | 7.41% | 7.576 us | 11.09% | -0.612 us | -7.48% | 🟢 FAST |
| I128 | I32 | 2^20 | 18.236 us | 2.69% | 17.829 us | 4.75% | -0.407 us | -2.23% | 🔵 SAME |
| I128 | I64 | 2^16 | 7.916 us | 6.16% | 7.198 us | 4.03% | -0.718 us | -9.07% | 🟢 FAST |
| I128 | I64 | 2^20 | 18.212 us | 2.74% | 17.800 us | 3.74% | -0.413 us | -2.27% | 🔵 SAME |
Looking at the int32 vs int64 runs I have concluded that we should go ahead and just use int64 for DeviceTransform. We should also investigate why uint64 is sometimes faster than int64 and where this comes from. The difference is sometimes >10%, which is remarkable.
32-bit vs. 64-bit is clearly not a concern from the compute point of view as the kernel is strongly memory bound. Some compiler optimizations could still affect performance. On the other hand, I would investigate what is the behavior wrt register usage, e.g. with large datatype or complex operator
Activity
bernhardmgruber commentedon May 15, 2026
Hopper results indicate that moving to 64-bit offset type is causing a bit of noise, but no systematic change in performance. We should also look at results for Blackwell and maybe for Ampere.
int32vsint64(--threshold-diff=0.01)int64vsuint64(--threshold-diff=0.01)bernhardmgruber commentedon May 19, 2026
On A100, does not matter either:
int32vsint64(--threshold-diff=0.01)int64vsuint64(--threshold-diff=0.01)bernhardmgruber commentedon May 24, 2026
B200
int32vsint64(--threshold-diff=0.01)Tiny regression on a 4/200 runs (I reran the benchmarks and compared again, and it was the same 4 benchmarks again):
int64vsuint64(--threshold-diff=0.01):I am genuinely surprised that the signed integer wins this much:
bernhardmgruber commentedon May 26, 2026
Looking at the
int32vsint64runs I have concluded that we should go ahead and just useint64forDeviceTransform. We should also investigate whyuint64is sometimes faster thanint64and where this comes from. The difference is sometimes >10%, which is remarkable.Hardcode DeviceTransform OffsetT to int64
fbusato commentedon May 26, 2026
32-bit vs. 64-bit is clearly not a concern from the compute point of view as the kernel is strongly memory bound. Some compiler optimizations could still affect performance. On the other hand, I would investigate what is the behavior wrt register usage, e.g. with large datatype or complex operator
bernhardmgruber commentedon May 27, 2026
Here is a compute intensive benchmark on H200 (reaches 33% SOL bandwidth, because of compute):
int32vsint64:I think we are good.
Hardcode `DeviceTransform` `OffsetT` to `int64` (#9127)
fbusato commentedon May 27, 2026
I meant something nontrivial with "complex" operator, but anyway, I think it is fine
bernhardmgruber commentedon May 28, 2026
I would say comparing the complex is non-trivial:
cccl/nvbench_helper/nvbench_helper/nvbench_helper.cuh
Lines 463 to 506 in a5394e6
Hardcode `DeviceTransform` `OffsetT` to `int64` (NVIDIA#9127)
Hardcode `DeviceTransform` `OffsetT` to `int64` (NVIDIA#9127)