Skip to content

Conversation

@masahi
Copy link
Member

@masahi masahi commented Mar 18, 2021

It seems we get segfault from Vulkan if a request to allocate 0 size is made. Returning nullptr in such case works for other backend, but VK seems to have issues. This workaround was confirmed to be effective.

Running NMS tests in test_any.py serves as the test case. Without this it would segfault.

@tmoreau89 @mbrookhart @tqchen

Copy link
Contributor

@mbrookhart mbrookhart left a comment

Choose a reason for hiding this comment

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

Could you do this for OpenCL as well and I'll close #7672 ? I think this is better than returning nullptr

Copy link
Contributor

@tmoreau89 tmoreau89 left a comment

Choose a reason for hiding this comment

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

Thanks for the fix @masahi ! I agree we should use the same solution for OpenCL.

@tqchen tqchen merged commit 9a29141 into apache:main Mar 19, 2021
@tqchen
Copy link
Member

tqchen commented Mar 19, 2021

Thanks @masahi @tmoreau89 @mbrookhart !

AndrewZhaoLuo pushed a commit to AndrewZhaoLuo/tvm that referenced this pull request Mar 22, 2021
* main:
  [AutoScheduler] Add function name in message (apache#7703)
  [Vulkan] Workaround for zero size allocation (apache#7691)
  Change behavior of onnx importer to throw when user provides an input no in the graph. (apache#7699)
  Free TensorRT engine and context (apache#7702)
  [TFLite] Cast operator adapted for MLIR-based convertor (apache#7639)
  [CPP_RPC] allow user supplied work dir (apache#7670)
  Default value for graph_runtime Init lookup_linked_param_func (apache#7676)
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request May 11, 2021
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.

4 participants