已关闭
[Bug-Report|缺陷反馈]: 1. torch_npu调用dynamic_dual_level_mx_quant不使用smooth_scale时报错 2. aclnn文档需要更新 #1876
gt0cd001创建于  4月1日关闭于  4月2日
gt0cd001
4月1日 创建

Describe the current behavior / 问题描述 (Mandatory / 必填)

import torch
import torch_npu
x = torch.randn(16384, 2048, dtype=torch.bfloat16).npu()
mul_scale = torch.randn(2048, dtype=torch.bfloat16).npu()
torch_npu.npu_dynamic_dual_level_mx_quant(x, smooth_scale=mul_scale) # OK
torch_npu.npu_dynamic_dual_level_mx_quant(x, smooth_scale=None) # Inner Error
torch_npu.npu_dynamic_dual_level_mx_quant(x) # Inner Error

报错信息:The data type of smooth_scale [UNDEFINED] should match the data type of x [DT_BFLOAT16], please check.

Environment / 环境信息 (Mandatory / 必填)

Ascend950PR

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

import torch
import torch_npu
x = torch.randn(16384, 2048, dtype=torch.bfloat16).npu()
mul_scale = torch.randn(2048, dtype=torch.bfloat16).npu()
torch_npu.npu_dynamic_dual_level_mx_quant(x, smooth_scale=mul_scale) # OK
torch_npu.npu_dynamic_dual_level_mx_quant(x, smooth_scale=None) # Inner Error
torch_npu.npu_dynamic_dual_level_mx_quant(x) # Inner Error

Describe the expected behavior / 预期结果 (Mandatory / 必填)

import torch
import torch_npu
x = torch.randn(16384, 2048, dtype=torch.bfloat16).npu()
mul_scale = torch.randn(2048, dtype=torch.bfloat16).npu()
torch_npu.npu_dynamic_dual_level_mx_quant(x, smooth_scale=mul_scale) # OK
torch_npu.npu_dynamic_dual_level_mx_quant(x, smooth_scale=None) # OK
torch_npu.npu_dynamic_dual_level_mx_quant(x) # OK

The data type of smooth_scale [UNDEFINED] should match the data type of x [DT_BFLOAT16], please check.

Special notes for this issue/备注 (Optional / 选填)

Describe the current behavior / 问题描述 (Mandatory / 必填)

aclnnDynamicDualLevelMxQuant.md需要更新

likedislike
gt0cd001
4月1日 评论:

/assign

likedislike
CANN-robotCANN-robot成员
4月1日 将 gt0cd001 设为负责人
Ggt0cd001
4月1日 关联了pull request:dynamic_dual_level_mx_quant: tiling: accept empty tensor for smooth scale
Ggt0cd001
4月1日 issue状态由 进行中 改变为 挂起
Ggt0cd001
4月2日 issue状态由 挂起 改变为 进行中
Ggt0cd001
4月2日 issue类型由 任务 改变为 缺陷
Ggt0cd001
4月2日 修改标题为 “[Bug-Report|缺陷反馈]: torch_npu调用dynamic_dual_level_mx_quant不使用smooth_scale时报错&aclnn文档需要更新”,原标题为“[Bug-Report|缺陷反馈]: torch_npu调用dynamic_dual_level_mx_quant不使用smooth_scale时报错”
Ggt0cd001
4月2日 修改标题为 “[Bug-Report|缺陷反馈]: 1. torch_npu调用dynamic_dual_level_mx_quant不使用smooth_scale时报错 2. aclnn文档需要更新”,原标题为“[Bug-Report|缺陷反馈]: torch_npu调用dynamic_dual_level_mx_quant不使用smooth_scale时报错&aclnn文档需要更新”
Ggt0cd001
4月2日 修改了issue 的描述
CANN-robotCANN-robot成员
4月2日 关闭了 issue
CANN-robotCANN-robot成员
4月2日 添加了label:resolved