Repository navigation
Conversation
Linear._load_from_state_dict looked up basic_ops.N.weight and basic_ops.N.bias without checking that they exist, so a state dict without them raised KeyError from the hook, even with strict=False. Copy a key only when the checkpoint has it, and leave missing params to the basic ops that own them, so load_state_dict reports them as missing keys like any other module. Add TestCheckpointing.test_linear_missing_params. Signed-off-by: Bindu Bhargava R Chintam <[email protected]> Signed-off-by: Pawel Gadzinski <[email protected]>
…grouped scale swizzle Signed-off-by: viking <[email protected]> Signed-off-by: Pawel Gadzinski <[email protected]>
Signed-off-by: viking <[email protected]> Signed-off-by: Pawel Gadzinski <[email protected]>
…t tensor Signed-off-by: viking <[email protected]> Signed-off-by: Pawel Gadzinski <[email protected]>
…Alignment Signed-off-by: viking <[email protected]> Signed-off-by: Pawel Gadzinski <[email protected]>
Signed-off-by: viking <[email protected]> Signed-off-by: Pawel Gadzinski <[email protected]>
RMSNorm.op_onnx_forward computed x.pow(2).mean(-1) in the input dtype. In FP16, any |x| >= 256 overflows x**2, and the export-mode forward and the exported model return an all-zero row. Compute in FP32, as onnx_layernorm already does for LayerNormLinear/LayerNormMLP with RMSNorm, and cast back to the same dtype as before. Signed-off-by: Netanel Nagar <[email protected]> Signed-off-by: Pawel Gadzinski <[email protected]>
When torch.__trace has a handler (TORCH_TRACE, or pytest's log capture, which attaches to non-propagating loggers since pytest 9.2), AOTAutograd formats its forward metadata with repr() of the fake outputs. NVFP4Tensor and MXFP8Tensor reprs dequantize their data, which adds guards such as Eq(s0, 128) and specializes dims marked dynamic, so compiling an op that returns these tensors raises ConstraintViolationError. Return the metadata-only repr for fake or meta data, as Float8Tensor already does, and add a regression test that installs a trace handler. Signed-off-by: rlaope <[email protected]> Signed-off-by: Pawel Gadzinski <[email protected]>
Signed-off-by: Pawel Gadzinski <[email protected]>
This branch has not been deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Aggregates several small, self-contained community bug fixes with original commit authorship preserved so they can be validated and landed together.
Fixes NVIDIA#4025, NVIDIA#4021, NVIDIA#3975
Type of change
Changes
bhargavchintam): lette.ops.Linear._load_from_state_dictload partial state dicts withstrict=Falsewithout raisingKeyError, remove redundant alias keys frommissing_keys, and addTestCheckpointing.test_linear_missing_params.VikingDeng): fix shared-memory WAR races and empty-tensor division by zero ingrouped_swizzle_scaling_variable_shape_kernel, drop the redundantmetadata_shmemdynamic smem padding (which exceeded 64 KB on SM 75), and addSwizzleTest.GroupedVariablePersistentGridandSwizzleTest.GroupedVariableEmptyTensors.VikingDeng): padrowwise_scale_inv_shape[0](multiple of 128) andcolumnwise_scale_inv_shape[0](multiple of 4) inMXFP8Tensor.__torch_dispatch__foraten.new_zeros.defaultto matchMXFP8Quantizer.get_scale_shape, and addtest_mxfp8_new_zeros_pads_scales_for_copy.VikingDeng): copy the out-of-placetorch.ops.symm_mem.one_shot_all_reduceresult back intoinpin both cached and uncached paths ofsymmetric_all_reduce, and add unit and two-GPU tests intests/pytorch/distributed/test_symmetric_memory.py.VikingDeng): passgradtoCheckAlignmentinDGatedActivationKernelLauncherso misalignedgradpointers do not issue aligned vector loads, and addSwiGLUGradAlignmentTest.MisalignedGrad.VikingDeng): add a stream-awarenvte_device_radix_sort_pairsoverload (keeping the 7-argument ABI) withNVTE_CHECK_CUDA, pass the caller stream andworkspace[3].nbytes()frommoe_permute_fwd, and addtest_permutation_index_map_cuda_graph.Nagarson): computeRMSNorm.op_onnx_forwardin FP32 and cast back totorch.promote_types(input_.dtype, weight.dtype)to avoid FP16 overflow on|x| >= 256, matchingonnx_layernorm.rlaope): returnsafe_quantized_reprinMXFP8Tensor.__repr__andNVFP4Tensor.__repr__when data is fake or meta so structured-trace logging does not specialize dynamic shapes undertorch.compile, and addtest_te_ops_bias_quantized_dynamic_with_trace_log.Checklist: