KEMBAR78
Sparse CUDA: rename files *.cu -> *.cpp by IvanYashchuk · Pull Request #63894 · pytorch/pytorch · GitHub
Skip to content

Conversation

@IvanYashchuk
Copy link
Collaborator

@IvanYashchuk IvanYashchuk commented Aug 24, 2021

Stack from ghstack:

This PR introduces a few code structure changes. There is no need to use
.cu extension for pure c++ code without cuda. Moved
s_addmm_out_csr_sparse_dense_cuda_worker to a separate cpp file from
cu file.

cc @nikitaved @pearu @cpuhrsch @IvanYashchuk @ngimel

Differential Revision: D30548771

This PR introduces a few code structure changes. There is no need to use
.cu extension for pure c++ code without cuda. Moved
`s_addmm_out_csr_sparse_dense_cuda_worker` to a separate cpp file from
cu file.

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Aug 24, 2021

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 76f3ee0 (more details on the Dr. CI page):


  • 1/1 failures introduced in this PR

🕵️ 1 new failure recognized by patterns

The following CI failures do not appear to be due to upstream breakages:

See CircleCI build pytorch_linux_xenial_py3_6_gcc5_4_build (1/1)

Step: "Build" (full log | diagnosis details | 🔁 rerun)

Aug 26 22:17:17 CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
Aug 26 22:17:17 invalid command 'bad_argument'
Aug 26 22:17:17 + retcode=1
Aug 26 22:17:17 + set -e
Aug 26 22:17:17 + return 1
Aug 26 22:17:17 + [[ pytorch-linux-xenial-py3.6-gcc5.4-build != *libtorch* ]]
Aug 26 22:17:17 + [[ pytorch-linux-xenial-py3.6-gcc5.4-build != *ppc64le* ]]
Aug 26 22:17:17 + [[ pytorch-linux-xenial-py3.6-gcc5.4-build != *clang* ]]
Aug 26 22:17:17 + WERROR=1
Aug 26 22:17:17 + python setup.py bdist_wheel
Aug 26 22:17:17 Building wheel torch-1.10.0a0+gitf99bfe2
Aug 26 22:17:17 CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
Aug 26 22:17:17   CMake 3.10 or higher is required.  You are running version 3.5.1
Aug 26 22:17:17 
Aug 26 22:17:17 
Aug 26 22:17:17 -- Configuring incomplete, errors occurred!
Aug 26 22:17:17 -- Building version 1.10.0a0+gitf99bfe2
Aug 26 22:17:17 cmake -DBUILD_ENVIRONMENT=pytorch-linux-xenial-py3.6-gcc5.4-build -DBUILD_PYTHON=True -DBUILD_STATIC_RUNTIME_BENCHMARK=ON -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/var/lib/jenkins/workspace/torch -DCMAKE_PREFIX_PATH=/opt/conda/lib/python3.6/site-packages;/opt/conda -DNUMPY_INCLUDE_DIR=/opt/conda/lib/python3.6/site-packages/numpy/core/include -DOPENSSL_ROOT_DIR=/opt/openssl -DPYTHON_EXECUTABLE=/opt/conda/bin/python -DPYTHON_INCLUDE_DIR=/opt/conda/include/python3.6m -DPYTHON_LIBRARY=/opt/conda/lib/libpython3.6m.so.1.0 -DTORCH_BUILD_VERSION=1.10.0a0+gitf99bfe2 -DUSE_GLOO_WITH_OPENSSL=ON -DUSE_LLVM=/opt/llvm -DUSE_NUMPY=True -DWERROR=1 /var/lib/jenkins/workspace
Aug 26 22:17:17 =================== sccache compilation log ===================
Aug 26 22:17:17 + cleanup
Aug 26 22:17:17 + retcode=1
Aug 26 22:17:17 + set +x

This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

This PR introduces a few code structure changes. There is no need to use
.cu extension for pure c++ code without cuda. Moved
`s_addmm_out_csr_sparse_dense_cuda_worker` to a separate cpp file from
cu file.

cc @nikitaved @pearu @cpuhrsch @IvanYashchuk @ngimel

[ghstack-poisoned]
IvanYashchuk added a commit to IvanYashchuk/pytorch that referenced this pull request Aug 24, 2021
This PR introduces a few code structure changes. There is no need to use
.cu extension for pure c++ code without cuda. Moved
`s_addmm_out_csr_sparse_dense_cuda_worker` to a separate cpp file from
cu file.

ghstack-source-id: 9c933ff
Pull Request resolved: pytorch#63894
This PR introduces a few code structure changes. There is no need to use
.cu extension for pure c++ code without cuda. Moved
`s_addmm_out_csr_sparse_dense_cuda_worker` to a separate cpp file from
cu file.

cc @nikitaved @pearu @cpuhrsch @IvanYashchuk @ngimel

[ghstack-poisoned]
IvanYashchuk added a commit to IvanYashchuk/pytorch that referenced this pull request Aug 25, 2021
This PR introduces a few code structure changes. There is no need to use
.cu extension for pure c++ code without cuda. Moved
`s_addmm_out_csr_sparse_dense_cuda_worker` to a separate cpp file from
cu file.

ghstack-source-id: 92647d7
Pull Request resolved: pytorch#63894
This PR introduces a few code structure changes. There is no need to use
.cu extension for pure c++ code without cuda. Moved
`s_addmm_out_csr_sparse_dense_cuda_worker` to a separate cpp file from
cu file.

cc @nikitaved @pearu @cpuhrsch @IvanYashchuk @ngimel

[ghstack-poisoned]
This PR introduces a few code structure changes. There is no need to use
.cu extension for pure c++ code without cuda. Moved
`s_addmm_out_csr_sparse_dense_cuda_worker` to a separate cpp file from
cu file.

cc @nikitaved @pearu @cpuhrsch @IvanYashchuk @ngimel

[ghstack-poisoned]
IvanYashchuk added a commit to IvanYashchuk/pytorch that referenced this pull request Aug 25, 2021
This PR introduces a few code structure changes. There is no need to use
.cu extension for pure c++ code without cuda. Moved
`s_addmm_out_csr_sparse_dense_cuda_worker` to a separate cpp file from
cu file.

ghstack-source-id: 36ab499
Pull Request resolved: pytorch#63894
Copy link
Contributor

@cpuhrsch cpuhrsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the comment, will merge after.

@cpuhrsch
Copy link
Contributor

@cpuhrsch has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@cpuhrsch
Copy link
Contributor

cuda11.1 test failures are legit. https://app.circleci.com/pipelines/github/pytorch/pytorch/370358/workflows/e71238b3-183a-41c4-ac17-f233abcff26c/jobs/15625496

You'll need to add a decorator that restricts running those tests to older cuda versions.

@ngimel
Copy link
Collaborator

ngimel commented Aug 25, 2021

Wait, but it's not a question of decorators, we need some alternative csrmm2 implementation for cuda 11 (or restructure other functions so that they don't call csrmm2)?

This PR introduces a few code structure changes. There is no need to use
.cu extension for pure c++ code without cuda. Moved
`s_addmm_out_csr_sparse_dense_cuda_worker` to a separate cpp file from
cu file.

cc @nikitaved @pearu @cpuhrsch @IvanYashchuk @ngimel

Differential Revision: [D30548771](https://our.internmc.facebook.com/intern/diff/D30548771)

[ghstack-poisoned]
@IvanYashchuk
Copy link
Collaborator Author

ATen/native/sparse/cuda/SparseCUDABlas.cu file had if defined(__CUDACC__) that after renaming to .cpp file became false enabling the codepath with deleted from CUDA 11 functions. Fixed by

 - #if defined(__CUDACC__)
 + #if defined(CUDART_VERSION)

This PR introduces a few code structure changes. There is no need to use
.cu extension for pure c++ code without cuda. Moved
`s_addmm_out_csr_sparse_dense_cuda_worker` to a separate cpp file from
cu file.

cc @nikitaved @pearu @cpuhrsch @IvanYashchuk @ngimel

Differential Revision: [D30548771](https://our.internmc.facebook.com/intern/diff/D30548771)

[ghstack-poisoned]
@IvanYashchuk
Copy link
Collaborator Author

@cpuhrsch, @ngimel, it should be safe now to import this PR.

@cpuhrsch
Copy link
Contributor

@cpuhrsch has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

IvanYashchuk added a commit to IvanYashchuk/pytorch that referenced this pull request Aug 26, 2021
This PR introduces a few code structure changes. There is no need to use
.cu extension for pure c++ code without cuda. Moved
`s_addmm_out_csr_sparse_dense_cuda_worker` to a separate cpp file from
cu file.

ghstack-source-id: db71374
Pull Request resolved: pytorch#63894
@facebook-github-bot
Copy link
Contributor

@cpuhrsch merged this pull request in ff4569a.

@facebook-github-bot facebook-github-bot deleted the gh/ivanyashchuk/36/head branch August 31, 2021 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged module: cuda Related to torch.cuda, and CUDA support in general module: sparse Related to torch.sparse open source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants