Skip to content

Remove artifical limitation on 5D tensors for GPU #325

Merged
ryanlai2 merged 1 commit intomasterfrom
user/rylai/remove_gpu_tensor_limitation
Jul 13, 2020
Merged

Remove artifical limitation on 5D tensors for GPU #325
ryanlai2 merged 1 commit intomasterfrom
user/rylai/remove_gpu_tensor_limitation

Conversation

@ryanlai2
Copy link
Contributor

Fixes this bug: #324

WinMLRunner rejects 5D tensors, with the message "Input feature input shape is too large. GPU path only accepts tensor dimensions <= 4 : 5", even though DirectML supports 5D tensors (and will likely support more than that too).

This will allow the correct error message to flow through DirectML to WinMLRunner.

@ryanlai2 ryanlai2 requested a review from a team as a code owner July 13, 2020 19:23
@ryanlai2 ryanlai2 requested a review from fdwr July 13, 2020 19:24
else if (inputFeature.Kind() == LearningModelFeatureKind::Tensor)
{
auto tensorFeatureDescriptor = inputFeature.try_as<TensorFeatureDescriptor>();
if (tensorFeatureDescriptor.Shape().Size() > 4 && deviceType != DeviceType::CPU)
Copy link
Member

Choose a reason for hiding this comment

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

should you leave this check and update the check and message to allow up to 5d tensors and not 6?

Copy link
Contributor

Choose a reason for hiding this comment

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

I'm adding 6D, 7D, 8D in just a few weeks. Please don't put artificial limitations in a tool, when the API should check it.

@ryanlai2 ryanlai2 merged commit 283c622 into master Jul 13, 2020
@martinb35 martinb35 deleted the user/rylai/remove_gpu_tensor_limitation branch June 21, 2021 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants