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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The validation of allocation sizes and strides has been commented out in the inferAndValidateAllocationSizesAndStrides function. This could potentially hide memory layout issues and should be verified that validation is no longer needed or moved elsewhere.
// if (tensor.numel() != 0) {// validateAllocationSizesAndStrides(tv, allocation_sizes,// allocation_strides);// }
The scaling and clamping logic in block_quantize_to_nvfp4 has been significantly modified. The previous implementation used explicit clamping with min/max bounds, while the new implementation relies on FP8 conversion for clamping. This changes the numerical behavior and should be verified for correctness across the full input range.
// This division should be replaced with a multiplication// by a reciprocal for better performance.// float scaled_max = block_max / 6.000000000e+00f;constexprfloat rcp_6f = 1.0f / 6.0f;
float scaled_max = 0.0f;
ifconstexpr (USE_GLOBAL_SCALE) {
scaled_max = block_max * global_scale[0] * rcp_6f;
} else {
scaled_max = block_max / 6.000000000e+00f;
}
__e4m3 clamped_max_fp8 = __float2e4m3(scaled_max);
float clamped_max = __e4m32float(clamped_max_fp8);
ifconstexpr (USE_GLOBAL_SCALE) {
clamped_max = global_scale[0] / clamped_max;
}
The bfloat16 conversion has been modified to use a double conversion (__bfloat2float -> __float2bfloat -> __bfloat2float) which appears redundant and may introduce precision loss. The original single conversion should be verified as correct.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.