Comments (4)
We currently fail on this kernel because the output is a scalar, so a workaround is to have the output be a 1-element array.
I can implement scalar outputs, but it doesn't seem particularly useful right now because we don't have any rewrite rules for horizontal vector operations (so the example kernels won't see any improvement). Is there a use case here where some more complicated, per-elements computations feed into a final horizontal accumulation?
from diospyros.
The particular function I have is inlined so it's possible that it may get called inside a loop. Though in general I don't know if this is a valid assumption. Do the multiple function subroutines get inlined into the dataflow graph before the dios compiler gets to processing it? If so then maybe we're ok and I'll just wrap it with a loop.
from diospyros.
Diospyros essentially inlines everything into the outermost function of what is passed in. So yes, if the calling context is a loop here, it would be more useful to pass the surrounding loop context, something like:
#define SIZE 8
void foo(float x_in, float y_in[3], float z_out) {
float acc = 0.0f;
for (int a = 0; a < 3; a++) {
acc = acc + x_in * y_in[a];
}
z_out = acc;
}
void loop(..., float all_outs[SIZE]) {
for (int a = 0; a < SIZE; a++) {
all_outs[a] = foo(...);
}
}
In that case, the inner function foo
should not need the input/output parameters to be tagged, as long as the outer (later) function does have the tags.
from diospyros.
Better error message for now in 0ac745b
from diospyros.
Related Issues (20)
- cdios: support for sqrt HOT 1
- Enable support for data-dependent if-else HOT 1
- Ternary operator support HOT 1
- Support for exponentiation in cdios HOT 2
- Support early returns/break/continue in cdios HOT 3
- cdios: support local static array initialization HOT 2
- cdios should build fresh racket executable if it doesn't exist
- Cdios error messages for unhandled C constructs should be lifted to surface syntax HOT 1
- CDIOS: Compiling C->Racket failed HOT 3
- Cdios: update import for c-utils library
- QR decomposition in cdios HOT 5
- Flag to run translation validation from cdios
- Translation of LLVM IR to Egg expressions HOT 2
- Mistake in generation of Egg expressions HOT 6
- Add CI for macOS and Ubuntu HOT 2
- Incorrect translation of float to i32 conversion HOT 3
- Local array creation HOT 3
- Flaky Behavior on Inline-Float.c HOT 1
- Issue with Logical XOR in C Program HOT 2
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 diospyros.