Comments (1)
I've given this a some thought and I'm not sure we should try to license code we generate for the user's expressions. It sounds like shaky legal grounds and I also don't want to antagonize users.
We should discuss this in a meeting, but for now I've added the following to the generated code:
/* Generated by the Tensor Algebra Compiler (tensor-compiler.org) */
The following patch gives us licensing:
diff --git a/tools/taco.cpp b/tools/taco.cpp
index a47a198..4cada42 100644
--- a/tools/taco.cpp
+++ b/tools/taco.cpp
@@ -65,6 +65,8 @@ static void printUsageInfo() {
cout << endl;
printFlag("nocolor", "Print without colors.");
cout << endl;
+ printFlag("license", "Print with the full license.");
+ cout << endl;
/*
cout << "Options planned for the future:" << endl;
@@ -101,6 +103,7 @@ int main(int argc, char* argv[]) {
bool printLattice = false;
bool evaluate = false;
bool color = true;
+ bool license = false;
string indexVarName = "";
@@ -146,6 +149,9 @@ int main(int argc, char* argv[]) {
else if ("-nocolor" == arg) {
color = false;
}
+ else if ("-license" == arg) {
+ license = true;
+ }
else {
if (exprStr.size() != 0) {
printUsageInfo();
@@ -175,10 +181,39 @@ int main(int argc, char* argv[]) {
tensor.compile();
- string gentext = "Generated by the Tensor Algebra Compiler (tensor-compiler.org)";
+ string gentext =
+ "Generated by the Tensor Algebra Compiler (taco) under the MIT license";
+
std::string green = (color) ? "\033[38;5;70m" : "";
std::string nc = (color) ? "\033[0m" : "";
- cout << green << "/* " << gentext << " */" << nc << endl;
+
+ if (license) {
+ cout << green << "/* ";
+ cout << gentext << endl << endl;
+ cout << " Copyright (c) 2016 MIT CSAIL and other contributors\n\n";
+ cout << " Permission is hereby granted, free of charge, to any person obtaining a copy\n";
+ cout << " of this software and associated documentation files (the \"Software\"), to deal\n";
+ cout << " in the Software without restriction, including without limitation the rights\n";
+ cout << " to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n";
+ cout << " copies of the Software, and to permit persons to whom the Software is\n";
+ cout << " furnished to do so, subject to the following conditions:\n\n";
+
+ cout << " The above copyright notice and this permission notice shall be included in all\n";
+ cout << " copies or substantial portions of the Software.\n\n";
+
+ cout << " THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n";
+ cout << " IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n";
+ cout << " FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n";
+ cout << " AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n";
+ cout << " LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n";
+ cout << " OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n";
+ cout << " SOFTWARE.\n";
+ cout << " */" << nc << endl;
+ }
+ else {
+ cout << green << "/* " << gentext << " */" << nc << endl;
+ }
+
bool hasPrinted = false;
if (printAssemble) {
from taco.
Related Issues (20)
- pytaco.tensor_sum() gives a wrong answer
- Reshape HOT 1
- Complex number realization for the python interface HOT 1
- tests fail on macOS ppc/ppc64; on 10.6.8 x86_64 two tests fail HOT 15
- Is it possible to generate OpenCL kernels with TACO? HOT 6
- Memory leak with `pytaco`
- Failure due to CUDA errors when generating code for CPU?
- Online tool cannot connect to server
- convolution HOT 2
- Scheduling Language more information. HOT 1
- Building Taco failed HOT 1
- Using IndexSetVar defined at runtime
- Output transformed C++ kernel code from the TACO C++ source code HOT 1
- Incorrect code generated when contraction index is not innermost
- kernel seg fault when processing large tensors HOT 1
- Double Occurrence of Parameters in Kernels Generated with CLI tool.
- COO sparse tensor contraction produces missing & duplicated entries
- TACO does not run parallel HOT 1
- BLD: building in modern Python environments HOT 1
- Can not generate omp parallel code for sparse tensors 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 taco.