hpac / linnea Goto Github PK
View Code? Open in Web Editor NEWLinnea is an experimental tool for the automatic generation of optimized code for linear algebra problems.
Home Page: https://linnea.cs.umu.se
License: GNU General Public License v3.0
Linnea is an experimental tool for the automatic generation of optimized code for linear algebra problems.
Home Page: https://linnea.cs.umu.se
License: GNU General Public License v3.0
Line 22 in 8d51d68
I get the following error when I call graph.write_output
with experiment_code=True
.
File "/usr/lib/python3.6/site-packages/pkg_resources/__init__.py", line 1465, in _get
return self.loader.get_data(path)
OSError: [Errno 0] Error: 'linnea/code_generation/experiments/templates/Cpp/CMakeLists.txt'
Running the example script from examples/run_linnea.py fails with the following exception:
Traceback (most recent call last):
File "/Users/user/Code/linnea/examples/run_linnea.py", line 4, in <module>
import linnea.config
File "/Users/user/Code/linnea/linnea/config.py", line 247, in <module>
load_config()
File "/Users/user/Code/linnea/linnea/config.py", line 237, in load_config
set_output_path(value)
File "/Users/user/Code/linnea/linnea/config.py", line 157, in set_output_path
raise DirectoryDoesNotExist(output_path)
linnea.config.DirectoryDoesNotExist: /Users/user/path/to/output
Note that examples/config.json sets the output path to "~/path/to/output" which might not necessarily exist. Not also however, that the output path option would be overridden in the code to be ".", but the example crashes before it comes to that.
From reading the README.md it sounds like since options from a config.json can be overridden via linnea.config.set_X
that a non existing directory should not crash the example.
While using the script 'examples/run_linnea.py' for a random equation over and over again, is it possible to set a seed so that Linnea generates the same set of variants in the same order every time?
I use this script to generate Julia codes. I get incorrect code (non-deterministic) for some Application examples.
Some errors:
Application 16 (operand sizes from "operand_generator.jl" and the requirements in generated code does not match
Also it would be better if the variable id numbers in the generated code are reset every time graph.write_output is called
Why not default no_duplicates=True? or Is there any reason to generate duplicate code?
Change the logic of MatrixGenerators. Strip them down of all checks/responsibilities and provide different/dedicated constructors for every matrix combination style. This will enable us to fine-tune parameters such as eigenvalues etc. based on the operand properties (Triangular, SPD etc.).
Reference here
Dear All,
I would be interested in using the Linnea frontend to parse a specific expression and emit intermediate representation (compiler IR). Can I use the class Equation to do that? (
linnea/linnea/algebra/equations.py
Line 35 in c8fb5d1
Hi there,
First of all, great tool!
Out of curiosity, given that Linnea produces Julia code eventually, why isn't it also implemented in Julia (rather than Python)? Any particular considerations?
Best,
Carsten
For the random expression the in script below, I always find only 1 algorithm when I set k_best arg to True in graph.write_output. But when I set it to False, I always find 5 algorithms.
import random
import linnea.config
linnea.config.set_output_code_path(".")
linnea.config.init()
from linnea.derivation.graph.derivation import DerivationGraph
from linnea.examples.random_expressions import generate_equation
random.seed(0)
rand_exprs = [generate_equation(random.randint(4, 7)) for _ in range(100)]
equations = rand_exprs[33]
graph = DerivationGraph(equations)
graph.derivation(time_limit=60,
merging=True,
dead_ends=True,
pruning_factor=1.5)
graph.write_output(code=True,
derivation=False,
output_name="tmp",
k_best=True,
experiment_code=False,
algorithms_limit=100,
graph=False)
I'm getting dimension mismatch for this example while executing the runner script.
A = Matrix("A", (m, n))
B = Matrix("B", (n, k))
C = Matrix("C", (k, l))
D = Matrix("D", (k, l))
Y = Matrix("Y", (m, l))
# Y = AB(C+ D)
self.eqns = Equations(Equal(Y,Plus(Times(A,B,C),Times(A,B,D))))
Shouldn't this be M*N?
linnea/linnea/kernels/julia/kernels.py
Line 653 in c8fb5d1
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.