Skip to content

Generate CUDAConfig.h only for CUDA builds#78218

Closed
malfet wants to merge 2 commits intomasterfrom
malfet-patch-11
Closed

Generate CUDAConfig.h only for CUDA builds#78218
malfet wants to merge 2 commits intomasterfrom
malfet-patch-11

Conversation

@malfet
Copy link
Contributor

@malfet malfet commented May 24, 2022

This should prevent failures like #77002 from sneaking in as CUDAConfig.h would no longer be available for cpu builds.
Note from 2018 about MIOpen builds do no seems relevant, though CUDAConfig.h is still needed by ROCm (tested in https://github.com/pytorch/pytorch/runs/6613660811?check_suite_focus=true build)

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented May 24, 2022

🔗 Helpful links

❌ 3 New Failures, 2 Pending

As of commit 9be5dc8 (more details on the Dr. CI page):

Expand to see more
  • 3/3 failures introduced in this PR

🕵️ 3 new failures recognized by patterns

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

See GitHub Actions build pull / linux-xenial-py3.7-gcc5.4 / test (backwards_compat, 1, 1, linux.2xlarge) (1/3)

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

2022-05-26T17:38:01.4807720Z The PR is introduc...m to confirm whether this change is wanted or not.
2022-05-26T17:38:01.4791935Z processing existing schema:  text(__torch__.torch.classes.profiling.SourceRef _0) -> str _0
2022-05-26T17:38:01.4793434Z processing existing schema:  count(__torch__.torch.classes.profiling.InstructionStats _0) -> int _0
2022-05-26T17:38:01.4794953Z processing existing schema:  duration_ns(__torch__.torch.classes.profiling.InstructionStats _0) -> int _0
2022-05-26T17:38:01.4796706Z processing existing schema:  source(__torch__.torch.classes.profiling.SourceStats _0) -> __torch__.torch.classes.profiling.SourceRef _0
2022-05-26T17:38:01.4798919Z processing existing schema:  line_map(__torch__.torch.classes.profiling.SourceStats _0) -> Dict(int, __torch__.torch.classes.profiling.InstructionStats) _0
2022-05-26T17:38:01.4800313Z processing existing schema:  __init__(__torch__.torch.classes.profiling._ScriptProfile _0) -> NoneType _0
2022-05-26T17:38:01.4801790Z processing existing schema:  enable(__torch__.torch.classes.profiling._ScriptProfile _0) -> NoneType _0
2022-05-26T17:38:01.4803235Z processing existing schema:  disable(__torch__.torch.classes.profiling._ScriptProfile _0) -> NoneType _0
2022-05-26T17:38:01.4805509Z processing existing schema:  _dump_stats(__torch__.torch.classes.profiling._ScriptProfile _0) -> __torch__.torch.classes.profiling.SourceStats[] _0
2022-05-26T17:38:01.4807255Z processing existing schema:  __init__(__torch__.torch.classes.dist_rpc.WorkerInfo _0, str _1, int _2) -> NoneType _0
2022-05-26T17:38:01.4807720Z The PR is introducing backward incompatible changes to the operator library. Please contact PyTorch team to confirm whether this change is wanted or not. 
2022-05-26T17:38:01.4807735Z 
2022-05-26T17:38:01.4808027Z Broken ops: [
2022-05-26T17:38:01.4808436Z 	aten::as_strided_scatter(Tensor self, Tensor src, int[] size, int[] stride, int? storage_offset=None) -> Tensor
2022-05-26T17:38:01.4808502Z ]
2022-05-26T17:38:01.5916428Z + cleanup
2022-05-26T17:38:01.5916574Z + retcode=1
2022-05-26T17:38:01.5916697Z + set +x
2022-05-26T17:38:01.5946733Z ##[error]Process completed with exit code 1.
2022-05-26T17:38:01.5985949Z ##[group]Run pytorch/pytorch/.github/actions/get-workflow-job-id@master
2022-05-26T17:38:01.5986031Z with:

See GitHub Actions build trunk / linux-bionic-rocm5.1-py3.7 / build (2/3)

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

2022-05-26T17:55:48.3809187Z Error generating file
2022-05-26T17:55:48.3751508Z     return __VA_ARGS__();                                                        \
2022-05-26T17:55:48.3751848Z            ^
2022-05-26T17:55:48.3752417Z /var/lib/jenkins/workspace/aten/src/ATen/native/Math.h:236:40: note: 'zeta' declared here
2022-05-26T17:55:48.3753046Z C10_HOST_DEVICE static inline scalar_t zeta(scalar_t x, scalar_t q) __ubsan_ignore_float_divide_by_zero__ {
2022-05-26T17:55:48.3753522Z                                        ^
2022-05-26T17:55:48.3754553Z /var/lib/jenkins/workspace/aten/src/ATen/native/hip/beta.hip:25:32: warning: use of function template name with no prior declaration in function call with explicit template arguments is a C++20 extension [-Wc++20-extensions]
2022-05-26T17:55:48.3755300Z                         return beta<scalar_t, true>(x, y);
2022-05-26T17:55:48.3755660Z                                ^
2022-05-26T17:55:48.3756054Z 5 warnings and 2 errors generated when compiling for gfx900.
2022-05-26T17:55:48.3808744Z �[31mCMake Error at torch_hip_generated_beta.hip.o.cmake:200 (message):
2022-05-26T17:55:48.3809187Z   Error generating file
2022-05-26T17:55:48.3809763Z   /var/lib/jenkins/workspace/build/caffe2/CMakeFiles/torch_hip.dir/__/aten/src/ATen/native/hip/./torch_hip_generated_beta.hip.o
2022-05-26T17:55:48.3810155Z 
2022-05-26T17:55:48.3810452Z �[0m
2022-05-26T17:55:48.3819826Z caffe2/CMakeFiles/torch_hip.dir/build.make:1041: recipe for target 'caffe2/CMakeFiles/torch_hip.dir/__/aten/src/ATen/native/hip/torch_hip_generated_beta.hip.o' failed
2022-05-26T17:55:48.3820635Z make[2]: *** [caffe2/CMakeFiles/torch_hip.dir/__/aten/src/ATen/native/hip/torch_hip_generated_beta.hip.o] Error 1
2022-05-26T17:55:48.3821551Z make[2]: *** Waiting for unfinished jobs....
2022-05-26T17:56:06.1815103Z In file included from /var/lib/jenkins/workspace/aten/src/ATen/native/nested/hip/NestedTensorTransformerFunctions.hip:11:
2022-05-26T17:56:06.1815842Z In file included from /var/lib/jenkins/workspace/aten/src/ATen/native/hip/Loops.cuh:14:
2022-05-26T17:56:06.1819441Z /var/lib/jenkins/workspace/aten/src/ATen/native/hip/MemoryAccess.cuh:39:26: warning: template template parameter using 'typename' is a C++17 extension [-Wc++17-extensions]
2022-05-26T17:56:06.1820163Z template<template<int i> typename func, int end, int current=0>

See GitHub Actions build trunk / macos-11-py3-x86-64 / test (default, 1, 2, macos-12) (3/3)

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

2022-05-26T19:53:05.6594130Z FAIL [2.184s]: tes...on.core.test_quantized_tensor.TestQuantizedTensor)
2022-05-26T19:53:05.6590580Z 
2022-05-26T19:53:05.6590680Z Mismatched elements: 1 / 1 (100.0%)
2022-05-26T19:53:05.6591120Z Greatest absolute difference: 0.058879315853118896 at index (0,) (up to 1e-05 allowed)
2022-05-26T19:53:05.6591950Z Greatest relative difference: 0.061076380857588604 at index (0,) (up to 1.3e-06 allowed) : TanH failed: tensor([0.9051], size=(1,), dtype=torch.qint32,
2022-05-26T19:53:05.6592540Z        quantization_scheme=torch.per_tensor_affine, scale=4.656612873077393e-10,
2022-05-26T19:53:05.6592870Z        zero_point=0) vs. tensor([0.9640], size=(1,), dtype=torch.qint32,
2022-05-26T19:53:05.6593300Z        quantization_scheme=torch.per_tensor_affine, scale=4.656612873077393e-10,
2022-05-26T19:53:05.6593560Z        zero_point=0)
2022-05-26T19:53:05.6593690Z 
2022-05-26T19:53:05.6593790Z ======================================================================
2022-05-26T19:53:05.6594130Z FAIL [2.184s]: test_choose_qparams (quantization.core.test_quantized_tensor.TestQuantizedTensor)
2022-05-26T19:53:05.6594620Z ----------------------------------------------------------------------
2022-05-26T19:53:05.6594910Z Traceback (most recent call last):
2022-05-26T19:53:05.6595270Z   File "/Users/runner/work/pytorch/pytorch/test/quantization/core/test_quantized_tensor.py", line 1150, in test_choose_qparams
2022-05-26T19:53:05.6595600Z     min_side=1, max_side=10),
2022-05-26T19:53:05.6596090Z   File "/Users/runner/miniconda3/envs/build/lib/python3.8/site-packages/hypothesis/core.py", line 1235, in wrapped_test
2022-05-26T19:53:05.6596430Z     raise the_error_hypothesis_found
2022-05-26T19:53:05.6596770Z   File "/Users/runner/work/pytorch/pytorch/test/quantization/core/test_quantized_tensor.py", line 1159, in test_choose_qparams
2022-05-26T19:53:05.6597170Z     np.testing.assert_array_almost_equal(X_scale, qparams[0], decimal=3)
2022-05-26T19:53:05.6597750Z   File "/Users/runner/miniconda3/envs/build/lib/python3.8/site-packages/numpy/testing/_private/utils.py", line 1045, in assert_array_almost_equal
2022-05-26T19:53:05.6598170Z     assert_array_compare(compare, x, y, err_msg=err_msg, verbose=verbose,

This comment was automatically generated by Dr. CI (expand for details).

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

Click here to manually regenerate this comment.

@malfet malfet added the ciflow/trunk Trigger trunk jobs on your pull request label May 25, 2022
@malfet
Copy link
Contributor Author

malfet commented May 26, 2022

@pytorchbot merge this

@github-actions
Copy link
Contributor

Hey @malfet.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

@malfet malfet added release notes: build release notes category topic: improvements topic category labels May 26, 2022
facebook-github-bot pushed a commit that referenced this pull request May 31, 2022
Summary:
This should prevent failures like #77002 from sneaking in as CUDAConfig.h would no longer be available for cpu builds.
Note from 2018 about MIOpen builds do no seems relevant, though CUDAConfig.h is still needed by ROCm (tested in https://github.com/pytorch/pytorch/runs/6613660811?check_suite_focus=true build)

Pull Request resolved: #78218
Approved by: https://github.com/seemethere, https://github.com/atalman

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/dfd78bf4ab6ce42a85458553724556995fa0b4a4

Reviewed By: seemethere

Differential Revision: D36783414

Pulled By: malfet

fbshipit-source-id: 7277a395772c4dbdc6fc2f55a6e9b594f724b955
@malfet malfet deleted the malfet-patch-11 branch July 17, 2022 18:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request cla signed Merged release notes: build release notes category topic: improvements topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants