-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BYOC][ACL] Add support for dense (fully connected) layer #6254
Conversation
This patch adds the ability to offload dense (or fully connected) operators to ACL. For fp32 a single dense layer can be offloaded, or the composite variant: nn.dense, nn.bias_add? (ACL does not currently offer fused activation). For uint8: qnn.dense, nn.bias_add?, qnn.requantize Change-Id: I83ea00b2aa6bdc5d9ef5cd6d54bbf981e523bd14
Change-Id: I856eb2298499fdf22c172ba7f85d21033d3cc920
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM.
@@ -114,8 +141,26 @@ def check_qnn_conv(extract): | |||
call = call.args[0] | |||
return qnn_conv2d(call.attrs, call.args) | |||
|
|||
def check_dense(extract): | |||
"""Check conv pattern is supported by ACL.""" | |||
call = extract |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reading check_qnn_dense
, do you need to check the out_dtype
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The out_dtype attribute check is actually on the requantize node. The first node in the extract for fp32 would be nn.bias_add which doesn't have the out_dtype attribute. The out_dtype is checked though in the dense function below. Hope that makes sense :)
* [BYOC][ACL] Add support for dense (fully connected) layer This patch adds the ability to offload dense (or fully connected) operators to ACL. For fp32 a single dense layer can be offloaded, or the composite variant: nn.dense, nn.bias_add? (ACL does not currently offer fused activation). For uint8: qnn.dense, nn.bias_add?, qnn.requantize Change-Id: I83ea00b2aa6bdc5d9ef5cd6d54bbf981e523bd14 * Don't offload dense layer with unsupported datatype Change-Id: I856eb2298499fdf22c172ba7f85d21033d3cc920
* [BYOC][ACL] Add support for dense (fully connected) layer This patch adds the ability to offload dense (or fully connected) operators to ACL. For fp32 a single dense layer can be offloaded, or the composite variant: nn.dense, nn.bias_add? (ACL does not currently offer fused activation). For uint8: qnn.dense, nn.bias_add?, qnn.requantize Change-Id: I83ea00b2aa6bdc5d9ef5cd6d54bbf981e523bd14 * Don't offload dense layer with unsupported datatype Change-Id: I856eb2298499fdf22c172ba7f85d21033d3cc920
* [BYOC][ACL] Add support for dense (fully connected) layer This patch adds the ability to offload dense (or fully connected) operators to ACL. For fp32 a single dense layer can be offloaded, or the composite variant: nn.dense, nn.bias_add? (ACL does not currently offer fused activation). For uint8: qnn.dense, nn.bias_add?, qnn.requantize Change-Id: I83ea00b2aa6bdc5d9ef5cd6d54bbf981e523bd14 * Don't offload dense layer with unsupported datatype Change-Id: I856eb2298499fdf22c172ba7f85d21033d3cc920
* [BYOC][ACL] Add support for dense (fully connected) layer This patch adds the ability to offload dense (or fully connected) operators to ACL. For fp32 a single dense layer can be offloaded, or the composite variant: nn.dense, nn.bias_add? (ACL does not currently offer fused activation). For uint8: qnn.dense, nn.bias_add?, qnn.requantize Change-Id: I83ea00b2aa6bdc5d9ef5cd6d54bbf981e523bd14 * Don't offload dense layer with unsupported datatype Change-Id: I856eb2298499fdf22c172ba7f85d21033d3cc920
* [BYOC][ACL] Add support for dense (fully connected) layer This patch adds the ability to offload dense (or fully connected) operators to ACL. For fp32 a single dense layer can be offloaded, or the composite variant: nn.dense, nn.bias_add? (ACL does not currently offer fused activation). For uint8: qnn.dense, nn.bias_add?, qnn.requantize Change-Id: I83ea00b2aa6bdc5d9ef5cd6d54bbf981e523bd14 * Don't offload dense layer with unsupported datatype Change-Id: I856eb2298499fdf22c172ba7f85d21033d3cc920
This patch adds the ability to offload dense (or fully connected) operator to ACL.
For fp32 a single dense layer can be offloaded, or the composite variant: nn.dense, nn.bias_add? (ACL does not currently offer fused activation).
For uint8: qnn.dense, nn.bias_add?, qnn.requantize
cc @mbaret @Leo-arm @giuseros @comaniac @zhiics