Comments (12)
For FullyConnected operator, it is (output_dim, input_dim)
. Generally operators use NHWC layout.
from xnnpack.
You can set all height dimensions (input height, kernel height, height subsampling) to 1, this would be equivalent to 1D convolution.
from xnnpack.
- F32 functions don't quantize computations. However, many F32 operators accept
output_min
andoutput_max
arguments which enable clamping output to arbitrary range (helpful e.g. for fusing simple activation functions). If you don't want to clamp output, just set them to+-std::numeric_limits<float>::infinity()
- XNNPACK is a fork of QNNPACK. Q8 operators in XNNPACK are remnants of QNNPACK code, but many internal optimizations were removed, and performance of these operators would be worse than in QNNPACK.
from xnnpack.
Okay thank you!
from xnnpack.
@Maratyszcza one more question, is the kernel shaped (input_dim, output_dim)
or (output_dim, input_dim)
?
edit: seems to be (output_dim, input_dim)
from xnnpack.
Works great!
Two more questions, any plans on adding an elementwise product operator? And is it somehow possible to make the FullyConnected add to the the output instead of setting it?
from xnnpack.
Elementwise product (including broadcasting support) landed just yesterday, see xnn_create_multiply_nd_f32
and xnn_setup_multiply_nd_f32
. Currently Fully Connected operator doesn't support fused addition, but you can use separate Add operator (see xnn_create_add_nc_f32
and xnn_setup_add_nc_f32
)
from xnnpack.
Haha perfect timing! Thanks
from xnnpack.
@Maratyszcza seems broadcasting support is not available for the add operation (for when one wants to implement batch normalization for example)? is my impression correct?
could disabling the check and setting the bias mean stride to 0 work as quick hack?
edit: hah looks like it does!
from xnnpack.
For batch normalization, I'd recommend to convert it into 1x1 depthwise convolution. XNNPACK has special optimizations for 1x1 DW convolution.
from xnnpack.
I'm not working with images, so my input/output matrixes are only 2D, I assume xnn_create_convolution2d...
would crash then (don't see a 1D version)? Don't see an option to set stride to 0 in one direction.
from xnnpack.
Ah thanks, forgot to check the setup function.
from xnnpack.
Related Issues (20)
- clang14.0.7 from Android NDK crashes when compiling bf16-gemm-1x4c8-minmax-neonbf16-bfdot.c HOT 14
- Typo in XNNPACK/doc /dwconv.md HOT 1
- pthreadpool cfi-icall check failure for XNNPACK function pointers casting HOT 2
- will you Plan to support int8 perchannel quantize for linear op? HOT 2
- building failed on Raspberry Pi 4 HOT 1
- Regarding the issue with f32-gemm-bench. HOT 2
- filtering out -mcpu=native when building with Bazel on Arm 64-bit (aarch64) HOT 2
- Help Wanted: How to use SIMD to accelerate Exponential function on CPU.
- Can RVV Kernels be enable by default? HOT 1
- Dynamic Shape Support HOT 4
- Build error when including XNNPACK using FetchContent HOT 4
- Help needed: any doc available.
- experiments-config.h is hiding the xnnpack.h header
- GELU support in XNNPACK HOT 4
- Need help: bench the 'sdpa' operator HOT 1
- Concatenate and Split don't support input that has 0 size dimension HOT 4
- Vector extension errors while building on RISC-V HOT 2
- Avoid undefined behavior in memcpy call in `xnn_define_static_reshape`
- Clamp on empty ranges should be valid HOT 2
- f32-raddstoreexpminusmax-rvv-rr2-p6-u4v.c error: no member named 'rvv_rr2_p6' in 'union xnn_f32_expminus_params' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xnnpack.