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

fix for enable model parallelism for non-fp32 data and symbolic interface #16683

Merged
merged 1 commit into from
Dec 4, 2019

Conversation

asmushetzel
Copy link
Contributor

Description

In symbolic model parallel computation where different nodes of the same compute graph are assigned to different physical devices, MXNet automatically inserts appropriate cross-device-copy operations whenever necessary. Though the internally generated copy does not work for any data type other than float32. Reason is that the properties of the CrossDeviceCopy are missing an explicit function for type inference (though they surprisingly have one for shape inference). So type inference falls back to the default implementation associated with the base operator class, which is an old dummy routine that just accepts fp32 data as input and output (defined in include/mxnet/operator.h, method OperatorProperty.InferType)

This fixes that problem by providing an appropriate type inference method for cross-device copy.

Note that this is only an issue for the symbolic interface, not for imperative nd.array interface (this is apparently based on a different implementation).

This bug is currently blocking development of a concrete application based on mxnet as this application uses symbolic API for good reasons and also needs to work with fp64 data.

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • Changes are complete (i.e. I finished coding on this PR)
  • [x ] All changes have test coverage
  • Code is well-documented:
  • [x ] To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

@asmushetzel
Copy link
Contributor Author

There has been no comment on this request for 25 days. Anyone that I can make interested?

@szha szha merged commit 02b4d2b into apache:master Dec 4, 2019
larroy pushed a commit to larroy/mxnet that referenced this pull request Dec 4, 2019
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.

None yet

2 participants