Skip to content

dtype generalization pass测试 #574

Description

@WHoutstanding

测试环境:
python=3.10
torch=2.6

  1. 使用graph_net/test/dtype_gen_test.sh测试graph_net/config/small100_torch_samples_list.txt中100个sample的float16和bfloat16的dtype generalization pass,测试结果:
Image

smaple_float16 和 sample_bfloat16 都生成的数量: 74
只生成 smaple_float16 的数量: 0
只生成 smaple_bfloat16 的数量: 7

  1. 使用graph_net/torch/validate.py对生成的sample_float16和sample_bfloat16进行验证,生成的smaple_float16 和 sample_bfloat16 都通过验证

  2. 部分sample dtype generalization pass 出现error,对RuntimeError 和 [WARNING]进行过滤,详细见error_log.txt.txt文件
    失败例子:
    RuntimeError: expected scalar type Half but found Float
    RuntimeError: expected scalar type BFloat16 but found Float
    2026-01-15 14:50:15,468 [WARNING] No dtype passes applicable for /home/aistudio/GraphNet/graph_net/../samples/transformers-auto-model/hf-tiny-model-private_tiny-random-Swinv2ForImageClassification

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions