error with check.py

未关闭
#61 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
18/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
cpp, python, pytorch
领域
devtools

调研方向

The failure is in check.py, where check_forward compares the baseline output with the CUDA output via check_equal and numpy's assert_allclose. The CUDA branch returns all zeros and the run ends in a segmentation fault, so start by reading the CUDA forward kernel and its build setup in the extension sources. Done would mean the CUDA output matches the baseline within tolerance and check.py forward --cuda exits cleanly. The thread has no comments or linked pull request, and the report was filed with an old PyTorch 1.4 environment, so reproduce on a current install first.

由索引模型根据 Issue 内容生成。

描述

PyTorch GitHub Issues Guidelines

  • OS: Ubuntu 18.04
  • PyTorch version: 1.4.0
  • How you installed PyTorch (conda, pip, source): conda
  • Python version: 3.6
  • CUDA/cuDNN version:10.0
  • GPU models and configuration: Geforce RTX 2080 ti
  • GCC version (if compiling from source): 7.5.0

when I run python check.py forward --cuda,
I got following error

Forward: Baseline (Python) vs. C++ ... Ok
Forward: Baseline (Python) vs. CUDA ... Traceback (most recent call last):
File "check.py", line 104, in
check_forward(variables, options.cuda, options.verbose)
File "check.py", line 45, in check_forward
check_equal(baseline_values, cuda_values, verbose)
File "check.py", line 22, in check_equal
np.testing.assert_allclose(x, y, err_msg="Index: {}".format(i))
File "/home/cogrob-wrc/.local/lib/python3.6/site-packages/numpy/testing/_private/utils.py", line 1533, in assert_allclose
verbose=verbose, header=header, equal_nan=equal_nan)
File "/home/cogrob-wrc/.local/lib/python3.6/site-packages/numpy/testing/_private/utils.py", line 846, in assert_array_compare
raise AssertionError(msg)
AssertionError:
Not equal to tolerance rtol=1e-07, atol=0
Index: 0
Mismatched elements: 15 / 15 (100%)
Max absolute difference: 0.91315287
Max relative difference: inf
x: array([[-0.913153, 0.066085, -0.006637, -0.306991, 0.552139],
[-0.28065 , -0.752348, 0.705655, 0.089504, 0.06883 ],
[-0.200587, 0.048015, 0.003387, 0.100579, -0.40925 ]])
y: array([[0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0.],
[0., 0., 0., 0., 0.]])
[1] 4035 segmentation fault (core dumped) python check.py forward --cuda

need help!!!!

主要语言
Python
星标
1.2k
派生
250
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pytorch/extension-cpp 的其他 Issue

查看 pytorch/extension-cpp 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。