Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Add cuda version check to skip building quantization ops for versions less than 8.0 #10710

Merged

Conversation

reminisce
Copy link
Contributor

Description

Build would fail if users installed cuda prior to version 8.0. Added cuda version check to prevent build failure.

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

Changes

  • Feature1, tests, (and when applicable, API doc)
  • Feature2, tests, (and when applicable, API doc)

Comments

  • If this change is a backward incompatible change, why must this change be made.
  • Interesting edge cases to note here

@marcoabreu
Copy link
Contributor

Please note this change is not verifiable by CI since we only support CUDA>=8.0. Please validate it manually

@reminisce reminisce force-pushed the add_cuda_version_check_for_quantization branch from c439b7b to c666eae Compare April 27, 2018 02:10
@reminisce reminisce changed the title [WIP] Add cuda version check to skip building quantization ops for versions less than 8.0 Add cuda version check to skip building quantization ops for versions less than 8.0 Apr 27, 2018
@reminisce
Copy link
Contributor Author

@marcoabreu I launched a Ubuntu 14.04 instance and installed cuda-7.5 and cudnn-6. The build can pass successfully with this PR. Unit tests other than quantization_gpu can pass as well which is as expected.

Please help to review: @szha @piiswrong @anirudh2290

@@ -270,7 +270,7 @@ void QuantizedConvForwardGPU(const nnvm::NodeAttrs& attrs,
const ConvolutionParam& param = nnvm::get<ConvolutionParam>(attrs.parsed);
CHECK_EQ(param.kernel.ndim(), 2U)
<< "QuantizedConvForward<gpu> only supports 2D convolution for now";
#if MXNET_USE_CUDNN == 1 && CUDNN_MAJOR >= 6
#if MXNET_USE_CUDNN == 1 && CUDNN_MAJOR >= 6 && CUDA_VERSION >= 8000
Copy link
Member

Choose a reason for hiding this comment

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

Does this need to have an else clause? What is the expected behavior if quantizedpoolforwadgpu is called with cuda version < 8 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There will be an error message printed saying that otherwise is not supported. I have made it clearer on specifying cudnn and cuda versions.

@reminisce reminisce force-pushed the add_cuda_version_check_for_quantization branch from 82c1da3 to 363de1e Compare April 28, 2018 02:53
@piiswrong piiswrong merged commit 23d933b into apache:master Apr 29, 2018
anirudh2290 pushed a commit to anirudh2290/mxnet that referenced this pull request Apr 29, 2018
… less than 8.0 (apache#10710)

* Add cuda version check to skip building quantization ops for version less 8

* Clearer error message on cuda and cudnn versions

* Trigger CI
anirudh2290 pushed a commit to anirudh2290/mxnet that referenced this pull request Apr 29, 2018
anirudh2290 pushed a commit to anirudh2290/mxnet that referenced this pull request Apr 30, 2018
piiswrong pushed a commit that referenced this pull request Apr 30, 2018
anirudh2290 pushed a commit to anirudh2290/mxnet that referenced this pull request May 7, 2018
… less than 8.0 (apache#10710)

* Add cuda version check to skip building quantization ops for version less 8

* Clearer error message on cuda and cudnn versions

* Trigger CI
rahul003 pushed a commit to rahul003/mxnet that referenced this pull request Jun 4, 2018
… less than 8.0 (apache#10710)

* Add cuda version check to skip building quantization ops for version less 8

* Clearer error message on cuda and cudnn versions

* Trigger CI
zheng-da pushed a commit to zheng-da/incubator-mxnet that referenced this pull request Jun 28, 2018
… less than 8.0 (apache#10710)

* Add cuda version check to skip building quantization ops for version less 8

* Clearer error message on cuda and cudnn versions

* Trigger CI
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants