Comments (6)
It seems that output size specification is not supported #377. I think this one can be solved with
def broadcast(float(N, M) I0, int K) -> (O) {
O(n, m, k) = I0(n, m) where k in 0:K
}
(I am looking at the reference https://facebookresearch.github.io/TensorComprehensions/semantics.html)
I haven't tried this yet.
from tensorcomprehensions.
@shekhovt That's great, thank you! What about one_hot
which has if
condition,
something like: O(x, k) = (k == A(x)) ? 1 : 0
?
from tensorcomprehensions.
Note that you can use look-up on the right hand side, like
Loss += Logits(b,Target(b))
Just to say that expanding everything by broadcasting or one_hot
might not be needed.
As I understand it, the language allows to do multi-dimensional reductions and lookups, but not going to be very useful for simple standalone operations you mentioned. There would be an implementation in pytorch or it would be straightforward to do it with CUDA extensions https://pytorch.org/tutorials/advanced/cpp_extension.html
from tensorcomprehensions.
@shekhovt For broadcast:
def broadcast(float(N, M) I0, int K) -> (O) {
O(n, m, k) = I0(n, m) where k in 0:K
}
How should I fill the second parameter? It is not a tensor but a scaler. If I didn't fill this value:
terminate called after throwing an instance of 'lang::ErrorReport'
what():
expected ) but found 'ident' here::
def broadcast(float(N, M) I0, int K) -> (O) {
~ <--- HERE
O(n, m, k) = I0(n, m) where k in 0:K
}
from tensorcomprehensions.
Can you actually compile TC with new CUDA and pytorch? I got now conda install TC with pytorch 0.3.1.post3 :( Does not seem very useful even if it can implement and autotune the op.
from tensorcomprehensions.
@shekhovt No, I am just using CUDA9.0 + Pytorch < 1.0 + TC and make them in docker to avoid the environment pollution, because I only need the source code it generates, which can satisfy my requirement.
from tensorcomprehensions.
Related Issues (20)
- [Build] Aten library cannot be found, incomplete config HOT 5
- Conda installation failed: PROTOBUF_LIBRARIES are used in this project, but they are set to NOTFOUND." HOT 1
- Convolution Backward Pass with kernel_size > 1 HOT 5
- module 'tensor_comprehensions' has no attribute 'make_autotuned_options_factory'
- Build from source HOT 4
- Update Conda package? HOT 1
- Question about how to integrate TC to my project HOT 1
- [Build] No rule to make libnvrtc.so needed by 'test/cuda/test_basic_gpu'.
- [BUILD] Trying on ubuntu 18.04
- Cannot find -lqcustomplot
- Is there support for pytorch 1.x ? HOT 2
- Can I have a minimum version excluding python and torch?
- [Build] error in llvm: include/llvm/Object/SymbolicFile.h HOT 3
- Is the project still under development? HOT 3
- [Build] dockerfile build failed, source code compilation failed HOT 1
- TC supports for Pytorch >= 1.0 or for CUDA 10.0?
- an IRBuilder interface for TensorComprehensions? HOT 1
- [Build] Error while "Building CXX object tc/core/CMakeFiles/tc_core_cpu.dir/polyhedral/llvm_jit.cc.o"
- Python API 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 tensorcomprehensions.