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

[MXNET-1266] Filling the strides of DLPack #13663

Closed
wants to merge 5 commits into from

Conversation

wkcn
Copy link
Member

@wkcn wkcn commented Dec 17, 2018

Description

DLPack allows strides is nullptr if the tensor is compact.
However, there are some frameworks, like DGL and PyTorch, which don't accept the DLPack whose strides is nullptr.

Fix: #13658

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

  • Fill the strides if the strides is nullptr.

Comments

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

@wkcn wkcn changed the title Filling the strides of DLPack [MXNET-1266] Filling the strides of DLPack Dec 17, 2018
@wkcn
Copy link
Member Author

wkcn commented Dec 17, 2018

The issue is solved.

In the CI ci/jenkins/mxnet-validation/edge,
it shows the following error:

/bin/sh: 1: /usr/local/cuda-9.0/targets/aarch64-linux/bin/nvcc: not found

make: *** [build/src/operator/nn/cudnn/cudnn_batch_norm_gpu.o] Error 127

make: *** Waiting for unfinished jobs....

@tqchen
Copy link
Member

tqchen commented Dec 18, 2018

I personally feel we should send patch to pytorch instead to support the case when strides == nullptr

@wkcn
Copy link
Member Author

wkcn commented Dec 18, 2018

@tqchen Yes. It is better to commit a patch to pytorch.

@Roshrini
Copy link
Member

@wkcn Are you going to close this PR and submit a patch to pytorch instead?

@mxnet-label-bot Add [pr-awaiting-review]

@marcoabreu marcoabreu added the pr-awaiting-review PR is waiting for code review label Dec 19, 2018
@wkcn
Copy link
Member Author

wkcn commented Dec 19, 2018

@Roshrini Yes. Thank you!

@wkcn wkcn closed this Dec 19, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr-awaiting-review PR is waiting for code review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Converting MX array to DLPack crashes when MX array goes out-of-scope
4 participants