I am working on implementing a full Res-Net model using ARIES. So far I have a convolutional layer, bias addition, and batch normalization layers. It has been tricky, but I have been able to make it work all in a single kernel.
I cannot implement a ReLU (Rectified Linear Unit) function using ARIES, because there is not support for a max() function or >. This is a simple function that returns 0 for negative inputs and the original value for positive inputs. ReLU is usually implemented with one of the following:
It looks to me like the only current operations that generate MLIR from ARIES python are *, /, +, - as seen in aries_ir_builder.py
It looks like in the Aries/lib emitter files there is support for a max() function and many other operations not yet supported on the frontend.
I was able to modify the generated AIE code to produce the results of a max() function. It was rather simple, but doing it by hand is not ideal for large projects:
v51 = fpmac(v51, v52, 0, 0x76543210, v50, 0, 0x76543210); // previous operation that I want to pass through ReLU
aie::vector<float,8> relu = max(v51, v17); // ReLU operation
I am working on implementing a full Res-Net model using ARIES. So far I have a convolutional layer, bias addition, and batch normalization layers. It has been tricky, but I have been able to make it work all in a single kernel.
I cannot implement a ReLU (Rectified Linear Unit) function using ARIES, because there is not support for a
max()function or>. This is a simple function that returns 0 for negative inputs and the original value for positive inputs. ReLU is usually implemented with one of the following:It looks to me like the only current operations that generate MLIR from ARIES python are
*, /, +, -as seen in aries_ir_builder.pyIt looks like in the Aries/lib emitter files there is support for a
max()function and many other operations not yet supported on the frontend.I was able to modify the generated AIE code to produce the results of a
max()function. It was rather simple, but doing it by hand is not ideal for large projects: