diff --git a/.gitignore b/.gitignore index 9489daa..d153e3e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,6 @@ +.DS_Store *.swp -*.DS_Store +*.swo +*.swn +.jekyll-cache/ +_site/ diff --git a/Gemfile b/Gemfile new file mode 100644 index 0000000..77b2610 --- /dev/null +++ b/Gemfile @@ -0,0 +1,9 @@ +gem "webrick", "~> 1.7" +group :jekyll_plugins do + gem "jekyll-remote-theme" + gem "jekyll-feed", "~> 0.6" + gem "jekyll-sitemap" + gem "jekyll-paginate" + gem "jekyll-seo-tag" + gem 'jekyll-redirect-from' +end diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..3548875 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,88 @@ +GEM + specs: + addressable (2.8.0) + public_suffix (>= 2.0.2, < 5.0) + colorator (1.1.0) + concurrent-ruby (1.1.10) + em-websocket (0.5.3) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0) + eventmachine (1.2.7) + ffi (1.15.5) + forwardable-extended (2.6.0) + http_parser.rb (0.8.0) + i18n (1.10.0) + concurrent-ruby (~> 1.0) + jekyll (4.2.2) + addressable (~> 2.4) + colorator (~> 1.0) + em-websocket (~> 0.5) + i18n (~> 1.0) + jekyll-sass-converter (~> 2.0) + jekyll-watch (~> 2.0) + kramdown (~> 2.3) + kramdown-parser-gfm (~> 1.0) + liquid (~> 4.0) + mercenary (~> 0.4.0) + pathutil (~> 0.9) + rouge (~> 3.0) + safe_yaml (~> 1.0) + terminal-table (~> 2.0) + jekyll-feed (0.15.1) + jekyll (>= 3.7, < 5.0) + jekyll-paginate (1.1.0) + jekyll-redirect-from (0.16.0) + jekyll (>= 3.3, < 5.0) + jekyll-remote-theme (0.4.3) + addressable (~> 2.0) + jekyll (>= 3.5, < 5.0) + jekyll-sass-converter (>= 1.0, <= 3.0.0, != 2.0.0) + rubyzip (>= 1.3.0, < 3.0) + jekyll-sass-converter (2.2.0) + sassc (> 2.0.1, < 3.0) + jekyll-seo-tag (2.8.0) + jekyll (>= 3.8, < 5.0) + jekyll-sitemap (1.4.0) + jekyll (>= 3.7, < 5.0) + jekyll-watch (2.2.1) + listen (~> 3.0) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + liquid (4.0.3) + listen (3.7.1) + rb-fsevent (~> 0.10, >= 0.10.3) + rb-inotify (~> 0.9, >= 0.9.10) + mercenary (0.4.0) + pathutil (0.16.2) + forwardable-extended (~> 2.6) + public_suffix (4.0.7) + rb-fsevent (0.11.1) + rb-inotify (0.10.1) + ffi (~> 1.0) + rexml (3.2.5) + rouge (3.28.0) + rubyzip (2.3.2) + safe_yaml (1.0.5) + sassc (2.4.0) + ffi (~> 1.9) + terminal-table (2.0.0) + unicode-display_width (~> 1.1, >= 1.1.1) + unicode-display_width (1.8.0) + webrick (1.7.0) + +PLATFORMS + x86_64-darwin-21 + +DEPENDENCIES + jekyll-feed (~> 0.6) + jekyll-paginate + jekyll-redirect-from + jekyll-remote-theme + jekyll-seo-tag + jekyll-sitemap + webrick (~> 1.7) + +BUNDLED WITH + 2.3.12 diff --git a/Makefile b/Makefile deleted file mode 100644 index f30e8e9..0000000 --- a/Makefile +++ /dev/null @@ -1,6 +0,0 @@ -all: docs - -docs: - cd documentation && mkdocs build && mv ../docs/reference site && rsync -a --delete site/* ../docs/ && rm -rf site - -.PHONY: docs diff --git a/_config.yml b/_config.yml new file mode 100644 index 0000000..a818391 --- /dev/null +++ b/_config.yml @@ -0,0 +1,3 @@ +remote_theme: chrisrhymes/bulma-clean-theme +title: "TACO: The Tensor Algebra Compiler" +google_analytics: UA-93058524-1 diff --git a/_data/navigation.yml b/_data/navigation.yml new file mode 100644 index 0000000..5702e1b --- /dev/null +++ b/_data/navigation.yml @@ -0,0 +1,10 @@ +- name: Docs + link: /docs +- name: Publications + link: /publications.html +- name: Related Projects + link: /related.html +- name: Web Tool + link: /codegen.html +- name: GitHub + link: https://github.com/tensor-compiler/taco diff --git a/_data/publications.yml b/_data/publications.yml new file mode 100644 index 0000000..bbdbcfe --- /dev/null +++ b/_data/publications.yml @@ -0,0 +1,505 @@ +- heading: 2022 + pubs: + - title: Autoscheduling for Sparse Tensor Algebra with an Asymptotic Cost Model + authors: Peter Ahrens, Fredrik Kjolstad, and Saman Amarasinghe + venue: PLDI 2022 + is_thesis: false + paper_link: files/ahrens-pldi22-taco-autoscheduling.pdf + abstract: > + While loop reordering and fusion can make big impacts on the constant-factor performance of dense tensor programs, the effects on sparse tensor programs are asymptotic, often leading to orders of magnitude performance differences in practice. Sparse tensors also introduce a choice of compressed storage formats that can have asymptotic effects. Research into sparse tensor compilers has led to simplified languages that express these tradeoffs, but the user is expected to provide a schedule that makes the decisions. This is challenging because schedulers must anticipate the interaction between sparse formats, loop structure, potential sparsity patterns, and the compiler itself. Automating this decision making process stands to finally make sparse tensor compilers accessible to end users. +

+ We present, to the best of our knowledge, the first automatic asymptotic scheduler for sparse tensor programs. We provide an approach to abstractly represent the asymptotic cost of schedules and to choose between them. We narrow down the search space to a manageably small Pareto frontier of asymptotically non-dominating kernels. We test our approach by compiling these kernels with the TACO sparse tensor compiler and comparing them with those generated with the default TACO schedules. Our results show that our approach reduces the scheduling space by orders of magnitude and that the generated kernels perform asymptotically better than those generated using the default schedules. + bibtex: > + @inproceedings{ahrens:2022:autoscheduling, + author = {Ahrens, Peter and Kjolstad, Fredrik and Amarasinghe, Saman}, + title = {Autoscheduling for Sparse Tensor Algebra with an Asymptotic Cost Model}, + year = {2022}, + isbn = {9781450392655}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + url = {https://doi.org/10.1145/3519939.3523442}, + doi = {10.1145/3519939.3523442}, + booktitle = {Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation}, + pages = {269–285}, + numpages = {17}, + keywords = {Asymptotic Analysis, Automatic Scheduling, Compilers, Conjunctive Query Containment, Query Optimization, Sparse Tensors}, + location = {San Diego, CA, USA}, + series = {PLDI 2022} + } + - title: "DISTAL: The Distributed Tensor Algebra Compiler" + authors: Rohan Yadav, Alex Aiken, and Fredrik Kjolstad + venue: PLDI 2022 + is_thesis: false + paper_link: files/yadav-pldi22-distal.pdf + abstract: > + We introduce DISTAL, a compiler for dense tensor algebra that targets modern distributed and heterogeneous systems. DISTAL lets users independently describe how tensors and computation map onto target machines through separate format and scheduling languages. The combination of choices for data and computation distribution creates a large design space that includes many algorithms from both the past (e.g., Cannon’s algorithm) and the present (e.g., COSMA). DISTAL compiles a tensor algebra domain specific language to a distributed task-based runtime system and supports nodes with multi-core CPUs and multiple GPUs. Code generated by is competitive with optimized codes for matrix multiply on 256 nodes of the Lassen supercomputer and outperforms existing systems by between 1.8x to 3.7x (with a 45.7x outlier) on higher order tensor operations. + bibtex: > + @inproceedings{yadav:2022:distal, + author = {Yadav, Rohan and Aiken, Alex and Kjolstad, Fredrik}, + title = {DISTAL: The Distributed Tensor Algebra Compiler}, + year = {2022}, + isbn = {9781450392655}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + url = {https://doi.org/10.1145/3519939.3523437}, + doi = {10.1145/3519939.3523437}, + booktitle = {Proceedings of the 43rd ACM SIGPLAN International Conference on Programming Language Design and Implementation}, + pages = {286–300}, + numpages = {15}, + keywords = {Compilers, Distributed Systems, High Performance Computing}, + location = {San Diego, CA, USA}, + series = {PLDI 2022} + } + - title: Unified Compilation for Lossless Compression and Sparse Computing + authors: Daniel Donenfeld, Stephen Chou, and Saman Amarasinghe + venue: CGO 2022 + is_thesis: false + paper_link: files/donenfeld-cgo22-taco-compression.pdf + youtube: uU3brPcwUos + abstract: > + This paper shows how to extend sparse tensor algebra compilers to support lossless compression techniques, including variants of run-length encoding and Lempel-Ziv compression. We develop new abstractions to represent losslessly compressed data as a generalized form of sparse tensors, with repetitions of values (which are compressed out in storage) represented by non-scalar, dynamic fill values. We then show how a compiler can use these abstractions to emit efficient code that computes on losslessly compressed data. By unifying lossless compression with sparse tensor algebra, our technique is able to generate code that computes with both losslessly compressed data and sparse data, as well as generate code that computes directly on compressed data without needing to first decompress it. +

+ Our evaluation shows our technique generates efficient image and video processing kernels that compute on losslessly compressed data. We find that the generated kernels are up to 16. 3× faster than equivalent dense kernels generated by TACO, a tensor algebra compiler, and up to 16. 1× faster than OpenCV, a widely used image processing library. + bibtex: > + @inproceedings{donenfeld:2022:compression, + author={Donenfeld, Daniel and Chou, Stephen and Amarasinghe, Saman}, + booktitle={2022 IEEE/ACM International Symposium on Code Generation and Optimization (CGO)}, + title={Unified Compilation for Lossless Compression and Sparse Computing}, + year={2022}, + pages={205-216}, + doi={10.1109/CGO53902.2022.9741282} + } +- heading: 2021 + pubs: + - title: Dynamic Sparse Tensor Algebra Compilation + authors: Stephen Chou and Saman Amarasinghe + venue: arXiv Preprint + is_thesis: false + paper_link: files/chou-arxiv-taco-dynamic.pdf + abstract: > + This paper shows how to generate efficient tensor algebra code that compute on dynamic sparse tensors, which have sparsity structures that evolve over time. We propose a language for precisely specifying recursive, pointer-based data structures, and we show how this language can express a wide range of dynamic data structures that support efficient modification, such as linked lists, binary search trees, and B-trees. We then describe how, given high-level specifications of such data structures, a compiler can generate code to efficiently iterate over and compute with dynamic sparse tensors that are stored in the aforementioned data structures. Furthermore, we define an abstract interface that captures how nonzeros can be inserted into dynamic data structures, and we show how this abstraction guides a compiler to emit efficient code that store the results of sparse tensor algebra computations in dynamic data structures. +

+ We evaluate our technique and find that it generates efficient dynamic sparse tensor algebra kernels. Code that our technique emits to compute the main kernel of the PageRank algorithm is 1.05× as fast as Aspen, a state-of-the-art dynamic graph processing framework. Furthermore, our technique outperforms PAM, a parallel ordered (key-value) maps library, by 7.40× when used to implement element-wise addition of a dynamic sparse matrix to a static sparse matrix. + bibtex: > + @article{chou:2021:dynamic, + author = {Chou, Stephen and Amarasinghe, Saman}, + title = {Dynamic Sparse Tensor Algebra Compilation}, + journal = {CoRR}, + volume = {abs/2112.01394}, + year = {2021}, + url = {https://arxiv.org/abs/2112.01394}, + eprinttype = {arXiv}, + eprint = {2112.01394}, + } + - title: Compilation of Sparse Array Programming Models + authors: Rawn Henry*, Olivia Hsu*, Rohan Yadav, Stephen Chou, Kunle Olukotun, Saman Amarasinghe, and Fredrik Kjolstad + venue: OOPSLA 2021 + is_thesis: false + paper_link: files/henry_hsu-oopsla21-taco-array.pdf + youtube: sY_jEfaP8f4 + abstract: > + This paper shows how to compile sparse array programming languages. A sparse array programming language is an array programming language that supports element-wise application, reduction, and broadcasting of arbitrary functions over dense and sparse arrays with any fill value. Such a language has great expressive power and can express sparse and dense linear and tensor algebra, functions over images, exclusion and inclusion filters, and even graph algorithms. +

+ Our compiler strategy generalizes prior work in the literature on sparse tensor algebra compilation to support any function applied to sparse arrays, instead of only addition and multiplication. To achieve this, we generalize the notion of sparse iteration spaces beyond intersections and unions. These iteration spaces are automatically derived by considering how algebraic properties annotated onto functions interact with the fill values of the arrays. We then show how to compile these iteration spaces to efficient code. +

+ When compared with two widely-used Python sparse array packages, our evaluation shows that we generate built-in sparse array library features with a performance of 1.4× to 53.7× when measured against PyData/Sparse for user-defined functions and between 0.98× and 5.53× when measured against SciPy/Sparse for sparse array slicing. Our technique outperforms PyData/Sparse by 6.58× to 70.3×, and (where applicable) performs between 0.96× and 28.9× that of a dense NumPy implementation, on end-to-end sparse array applications. We also implement graph linear algebra kernels in our system with a performance of between 0.56× and 3.50× compared to that of the hand-optimized SuiteSparse:GraphBLAS library. + bibtex: > + @article{henry_hsu:2021:array, + author = {Henry, Rawn and Hsu, Olivia and Yadav, Rohan and Chou, Stephen and Olukotun, Kunle and Amarasinghe, Saman and Kjolstad, Fredrik}, + title = {Compilation of Sparse Array Programming Models}, + year = {2021}, + issue_date = {October 2021}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + volume = {5}, + number = {OOPSLA}, + url = {https://doi.org/10.1145/3485505}, + doi = {10.1145/3485505}, + journal = {Proc. ACM Program. Lang.}, + month = {oct}, + articleno = {128}, + numpages = {29}, + keywords = {Sparse Array Programming, Compilation, Sparse Arrays} + } +- heading: 2020 + pubs: + - title: A Sparse Iteration Space Transformation Framework for Sparse Tensor Algebra + authors: Ryan Senanayake, Changwan Hong, Ziheng Wang, Amalee Wilson, Stephen Chou, Shoaib Kamil, Saman Amarasinghe, and Fredrik Kjolstad + venue: OOPSLA 2020 + is_thesis: false + paper_link: files/senanayake-oopsla20-taco-scheduling.pdf + youtube: 0wJsGWA5pTU + abstract: > + We address the problem of optimizing sparse tensor algebra in a compiler and show how to define standard loop transformations---split, collapse, and reorder---on sparse iteration spaces. The key idea is to track the transformation functions that map the original iteration space to derived iteration spaces. These functions are needed by the code generator to emit code that maps coordinates between iteration spaces at runtime, since the coordinates in the sparse data structures remain in the original iteration space. We further demonstrate that derived iteration spaces can tile both the universe of coordinates and the subset of nonzero coordinates: the former is analogous to tiling dense iteration spaces, while the latter tiles sparse iteration spaces into statically load-balanced blocks of nonzeros. Tiling the space of nonzeros lets the generated code efficiently exploit heterogeneous compute resources such as threads, vector units, and GPUs. +

+ We implement these concepts by extending the sparse iteration theory implementation in the TACO system. The associated scheduling API can be used by performance engineers or it can be the target of an automatic scheduling system. We outline one heuristic autoscheduling system, but other systems are possible. Using the scheduling API, we show how to optimize mixed sparse-dense tensor algebra expressions on CPUs and GPUs. Our results show that the sparse transformations are sufficient to generate code with competitive performance to hand-optimized implementations from the literature, while generalizing to all of the tensor algebra. + bibtex: > + @article{senanayake:2020:scheduling, + author = {Senanayake, Ryan and Hong, Changwan and Wang, Ziheng and Wilson, Amalee and Chou, Stephen and Kamil, Shoaib and Amarasinghe, Saman and Kjolstad, Fredrik}, + title = {A Sparse Iteration Space Transformation Framework for Sparse Tensor Algebra}, + year = {2020}, + issue_date = {November 2020}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + volume = {4}, + number = {OOPSLA}, + url = {https://doi.org/10.1145/3428226}, + doi = {10.1145/3428226}, + journal = {Proc. ACM Program. Lang.}, + month = nov, + articleno = {158}, + numpages = {30}, + keywords = {Sparse Tensor Algebra, Sparse Iteration Spaces, Optimizing Transformations} + } + - title: Sparse Tensor Transpositions + authors: Suzanne Mueller, Peter Ahrens, Stephen Chou, Fredrik Kjolstad, and Saman Amarasinghe + venue: SPAA 2020 + is_thesis: false + paper_link: files/mueller-spaa20-taco-transpositions.pdf + youtube: rUtw6vLZR-g + abstract: > + We present a new algorithm for transposing sparse tensors called Quesadilla. The algorithm converts the sparse tensor data structure to a list of coordinates and sorts it with a fast multi-pass radix algorithm that exploits knowledge of the requested transposition and the tensors input partial coordinate ordering to provably minimize the number of parallel partial sorting passes. We evaluate both a serial and a parallel implementation of Quesadilla on a set of 19 tensors from the FROSTT collection, a set of tensors taken from scientific and data analytic applications. We compare Quesadilla and a generalization, Top-2-sadilla to several state of the art approaches, including the tensor transposition routine used in the SPLATT tensor factorization library. In serial tests, Quesadilla was the best strategy for 60% of all tensor and transposition combinations and improved over SPLATT by at least 19% in half of the combinations. In parallel tests, at least one of Quesadilla or Top-2-sadilla was the best strategy for 52% of all tensor and transposition combinations. + bibtex: > + @inproceedings{mueller:2020:transposition, + author = {Mueller, Suzanne and Ahrens, Peter and Chou, Stephen and Kjolstad, Fredrik and Amarasinghe, Saman}, + title = {Sparse Tensor Transpositions}, + year = {2020}, + isbn = {9781450369350}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + url = {https://doi.org/10.1145/3350755.3400245}, + doi = {10.1145/3350755.3400245}, + booktitle = {Proceedings of the 32nd ACM Symposium on Parallelism in Algorithms and Architectures}, + pages = {559–561}, + numpages = {3}, + keywords = {COO, sorting, radix sort, transposition, sparse tensors}, + location = {Virtual Event, USA}, + series = {SPAA '20} + } + - title: Automatic Generation of Efficient Sparse Tensor Format Conversion Routines + authors: Stephen Chou, Fredrik Kjolstad, and Saman Amarasinghe + venue: PLDI 2020 + is_thesis: false + paper_link: files/chou-pldi20-taco-conversion.pdf + slide_link: files/chou-pldi20-slides.pdf + youtube: s6JRY8qcjvA + abstract: > + This paper shows how to generate code that efficiently converts sparse tensors between disparate storage formats (data layouts) such as CSR, DIA, ELL, and many others. We decompose sparse tensor conversion into three logical phases: coordinate remapping, analysis, and assembly. We then develop a language that precisely describes how different formats group together and order a tensor’s nonzeros in memory. This lets a compiler emit code that performs complex remappings of nonzeros when converting between formats. We also develop a query language that can extract statistics about sparse tensors, and we show how to emit efficient analysis code that computes such queries. Finally, we define an abstract interface that captures how data structures for storing a tensor can be efficiently assembled given specific statistics about the tensor. Disparate formats can implement this common interface, thus letting a compiler emit optimized sparse tensor conversion code for arbitrary combinations of many formats without hard-coding for any specific combination. +

+ Our evaluation shows that the technique generates sparse tensor conversion routines with performance between 1.00 and 2.01× that of hand-optimized versions in SPARSKIT and Intel MKL, two popular sparse linear algebra libraries. And by emitting code that avoids materializing temporaries, which both libraries need for many combinations of source and target formats, our technique outperforms those libraries by 1.78 to 4.01× for CSC/COO to DIA/ELL conversion. + bibtex: > + @inproceedings{chou:2020:conversion, + author = {Chou, Stephen and Kjolstad, Fredrik and Amarasinghe, Saman}, + title = {Automatic Generation of Efficient Sparse Tensor Format Conversion Routines}, + year = {2020}, + isbn = {9781450376136}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + url = {https://doi.org/10.1145/3385412.3385963}, + doi = {10.1145/3385412.3385963}, + booktitle = {Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation}, + pages = {823–838}, + numpages = {16}, + keywords = {coordinate remapping notation, attribute query language, sparse tensor formats, sparse tensor conversion, sparse tensor assembly, sparse tensor algebra}, + location = {London, UK}, + series = {PLDI 2020} + } + - title: A Framework for Computing on Sparse Tensors based on Operator Properties + authors: Rawn Henry + venue: MEng Thesis + is_thesis: true + paper_link: files/henry-meng-thesis-taco-array.pdf + abstract: > + Tensor operations have been traditionally limited to addition and multiplication operations. For operations of sparse tensors, these semantics were extended to account for the fact that tensors usually omit zero values. However, there are many operators with a rich semantics of operator properties that can be used in dense and sparse tensor computations. +

+ This work addresses the problem of generating code for computing on a mix of sparseand dense tensors based on the properties of the operators on those tensors. I introduce the concept of a fill value to each tensor so that the data can be sparse on non-zeros. I show how to reason about the operator properties, along with the fillvalues of the input tensors in order to construct an IR describing how to iterate overthese tensors. I show how we can take advantage of the operator properties to perform useful optimizations for both iterating over tensors and performing reductions. Lastly, I show how a user can leverage set notation to directly describe to a compiler how it should iterate over sparse tensors. +

+ The ideas discussed in this work have been prototyped in the open-source TACOsystem. The API used makes operator properties and tensor fill values have to beexplicitly provided by the user. However, it makes the TACO system much more flexible. I show how the primitives exposed in this work allows one to efficiently performseveral graph algorithms by drawing on the literature about GraphBLAS. In the evaluation section, we benchmark this system against the SuiteSparse implementation ofGraphBLAS on a variety of graph algorithms to demonstrate its performance. + bibtex: > + @MastersThesis{henry:2020:meng-thesis, + title = "A Framework for Computing on Sparse Tensors based on Operator Properties", + author = "Rawn Henry", + month = "May", + year = "2020", + url = "http://tensor-compiler.org/files/henry-meng-thesis-taco-array.pdf", + type = "M.Eng. Thesis", + address = "Cambridge, MA", + school = "Massachusetts Institute of Technology", + } + - title: Automatic Optimization of Sparse Tensor Algebra Programs + authors: Ziheng Wang + venue: MEng Thesis + is_thesis: true + paper_link: files/wang-meng-thesis-taco-autoscheduling.pdf + abstract: > + In this thesis, I attempt to give some guidance on how to automatically optimize programs using a domain-specific-language (DSLs) compiler that exposes a set of scheduling commands. These DSLs have proliferated as of late, including Halide, TACO, Tiramisu and TVM, to name a few. The scheduling commands allow succinct expression of the programmer’s desire to perform certain loop transformations,such as strip-mining, tiling, collapsing and parallelization, which the compiler proceeds to carry out. I explore if we can automatically generate schedules with good performance. +

+ The main difficulty in searching for good schedules is the astronomical number of valid schedules for a particular program. I describe a system which generates a list of candidate schedules through a set of modular stages. Different optimization decisions are made at each stage, to trim down the number of schedules considered. I argue that certain sequences of scheduling commands are equivalent in their effect in partitioning the iteration space, and introduce heuristics that limit the number of permutations of variables. I implement these ideas for the open-source TACO system. I demonstrate several orders of magnitude reduction in the effective schedule search space. I also show that for most of the problems considered, we can generate schedules better than or equal to hand-tuned schedules in terms of performance. + bibtex: > + @MastersThesis{wang:2020:meng-thesis, + title = "Automatic Optimization of Sparse Tensor Algebra Programs", + author = "Ziheng Wang", + month = "May", + year = "2020", + url = "http://tensor-compiler.org/files/wang-meng-thesis-taco-autoscheduling.pdf", + type = "M.Eng. Thesis", + address = "Cambridge, MA", + school = "Massachusetts Institute of Technology", + } + - title: A Unified Iteration Space Transformation Framework for Sparse and Dense Tensor Algebra + authors: Ryan Senanayake + venue: MEng Thesis + is_thesis: true + paper_link: files/senanayake-meng-thesis-taco-scheduling.pdf + abstract: > + This work addresses the problem of optimizing mixed sparse and dense tensor algebra in a compiler. I show that standard loop transformations, such as strip-mining, tiling, collapsing, parallelization and vectorization, can be applied to irregular loops over sparse iteration spaces. I also show how these transformations can be applied to the contiguous value arrays of sparse tensor data structures, which I call their position spaces, to unlock load-balanced tiling and parallelism. +

+ These concepts have been prototyped in the open-source TACO system, where they are exposed as a scheduling API similar to the Halide domain-specific language for dense computations. Using this scheduling API, I show how to optimize mixed sparse/dense tensor algebra expressions, how to generate load-balanced code by scheduling sparse tensor algebra in position space, and how to generate sparse tensor algebra GPU code. As shown in the evaluation, these transformations allow us to generate code that is competitive with many hand-optimized implementations from the literature. + bibtex: > + @MastersThesis{senanayake:2020:meng-thesis, + title = "A Unified Iteration Space Transformation Framework for Sparse and Dense Tensor Algebra", + author = "Ryan Senanayake", + month = "Feb", + year = "2020", + url = "http://tensor-compiler.org/files/senanayake-meng-thesis-taco-scheduling.pdf", + type = "M.Eng. Thesis", + address = "Cambridge, MA", + school = "Massachusetts Institute of Technology", + } + - title: Sparse Tensor Transpositions in the Tensor Algebra Compiler + authors: Suzanne Mueller + venue: MEng Thesis + is_thesis: true + paper_link: files/mueller-meng-thesis-taco-transposition.pdf + abstract: > + The current state of the art for transposing sparse tensors involves converting the sparse tensor into a list of coordinates, sorting the list of coordinates and finally packing the list of coordinates into the desired sparse tensor format. This thesis explores the potential for faster methodologies. Its main contributions are an algorithm that exploits partial sortedness to minimize sorting passes and an implementation that demonstrates that this transposition algorithm is competitive with state of the art. In particular the algorithm takes advantage of the ordering that already exists to apply selective sorting passes and thereby reduce the amount of work that needsto be done to reorder the tensor. + bibtex: > + @MastersThesis{mueller:2020:meng-thesis, + title = "Sparse Tensor Transpositions in the Tensor Algebra Compiler", + author = "Suzanne Mueller", + month = "Feb", + year = "2020", + url = "http://tensor-compiler.org/files/mueller-meng-thesis-taco-transposition.pdf", + type = "M.Eng. Thesis", + address = "Cambridge, MA", + school = "Massachusetts Institute of Technology", + } + - title: Sparse Tensor Algebra Compilation + authors: Fredrik Kjolstad + venue: PhD Thesis + is_thesis: true + paper_link: files/kjolstad-phd-thesis-taco-compiler.pdf + abstract: > + This dissertation shows how to compile any sparse tensor algebra expression to CPU and GPU code that matches the performance of hand-optimized implementations. A tensor algebra expression is sparse if at least one of its tensor operands is sparse, and a tensor is sparse if most of its values are zero. If a tensor is sparse, then we can store its nonzero values in a compressed data structure, and omit the zeros. Indeed, as the matrices and tensors in many important applications are extremely sparse, compressed data structures provide the only practical means to store them. A sparse tensor algebra expression may contain any number of operations, which must be compiled to fused sparse loops that compute the entire expression simultaneously. It is not viable to support only binary expressions, because their composition may result in worse asymptotic complexity than the fused implementation. I present compiler techniques to generate fused loops that coiterate over any number of tensors stored in different types of data structures. By design, these loops avoid computing values known to be zero due to the algebraic properties of their operators. +

+ Sparse tensor algebra compilation is made possible by a sparse iteration theory that formulates sparse iteration spaces as set expressions of the coordinates of nonzero values. By ordering iteration space dimensions hierarchically, the compiler recursively generates loops that coiterate over tensor data structures one dimension at a time. By organizing per-dimension coiteration into regions based on algebraic operator properties, it removes operations that will result in zero. And by transforming the sparse iteration spaces, it optimizes the generated code. The result is the first sparse iteration compiler, called the Tensor Algebra Compiler (taco). Taco can compile any tensor algebra expressions, with tensors stored in different types of sparse and dense data structures, to code that matches the performance of hand-optimized implementations on CPUs and GPUs. + bibtex: > + @PhDThesis{kjolstad:2020:phd-thesis, + title = "Sparse Tensor Algebra Compilation", + author = "Fredrik Kjolstad", + month = "Feb", + year = "2020", + url = "http://tensor-compiler.org/files/kjolstad-phd-thesis-taco-compiler.pdf", + type = "Ph.D. Thesis", + address = "Cambridge, MA", + school = "Massachusetts Institute of Technology", + } +- heading: 2019 + pubs: + - title: A Tensor Algebra Compiler Library Interface and Runtime + authors: Patricio Noyola + venue: MEng Thesis + is_thesis: true + paper_link: files/noyola-meng-thesis-taco-interface.pdf + abstract: > + Tensor algebra is a powerful tool for computing on multidimensional data and has applications in many fields. The number of possible tensor operations is infinite, so it is impossible to manually implement all of them to operate on different tensor dimensions. The Tensor Algebra Compiler (taco) introduced a compiler approach to automatically generate kernels for any compound tensor algebra operation on any input tensor formats. +

+ In this thesis, we present a new API for the taco library. The API removes the need to call compiler methods with the introduction of a delayed execution framework. Additionally, the API introduces multiple important tensor algebra features previously unavailable in taco. Finally, we propose extensions to taco’s code generation algorithm to automatically generate tensor API methods for any tensor format. +

+ The proposed API makes taco code cleaner, shorter and more elegant. Furthermore, the extensions to its code generation algorithm make the API scalable to new formats and operations. + bibtex: > + @MastersThesis{noyola:2019:meng-thesis, + title = "A Tensor Algebra Compiler Library Interface and Runtime", + author = "Patricio Noyola", + month = "May", + year = "2019", + url = "http://tensor-compiler.org/files/noyola-meng-thesis-taco-interface.pdf", + type = "M.Eng. Thesis", + address = "Cambridge, MA", + school = "Massachusetts Institute of Technology", + } + - title: "SuperTaco: Taco Tensor Algebra Kernels on Distributed Systems Using Legion" + authors: Sachin Dilip Shinde + venue: MEng Thesis + is_thesis: true + paper_link: files/shinde-meng-thesis-taco-distributed.pdf + abstract: > + Tensor algebra is a powerful language for expressing computation on multidimensional data. While many tensor datasets are sparse, most tensor algebra libraries have limited support for handling sparsity. The Tensor Algebra Compiler (Taco) has introduced a taxonomy for sparse tensor formats that has allowed them to compile sparse tensor algebra expressions to performant C code, but they have not taken advantage of distributed systems. +

+ This work provides a code generation technique for creating Legion programs that distribute the computation of Taco tensor algebra kernels across distributed systems, and a scheduling language for controlling how this distributed computation is structured. This technique is implemented in the form of a command-line tool called SuperTaco. We perform a strong scaling analysis for the SpMV and TTM kernels under a row blocking distribution schedule, and find speedups of 9-10x when using 20 cores on a single node. For multi-node systems using 20 cores per node, SpMV achieves a 33.3x speedup at 160 cores and TTM achieves a 42.0x speedup at 140 cores. + bibtex: > + @MastersThesis{shinde:2019:meng-thesis, + title = "SuperTaco: Taco Tensor Algebra Kernels on Distributed Systems Using Legion", + author = "Sachin Dilip Shinde", + month = "Feb", + year = "2019", + url = "http://tensor-compiler.org/files/shinde-meng-thesis-taco-distributed.pdf", + type = "M.Eng. Thesis", + address = "Cambridge, MA", + school = "Massachusetts Institute of Technology", + } + - title: Tensor Algebra Compilation with Workspaces + authors: Fredrik Kjolstad, Peter Ahrens, Shoaib Kamil, and Saman Amarasinghe + venue: CGO 2019 + is_thesis: false + paper_link: files/kjolstad-cgo19-taco-workspaces.pdf + abstract: > + This paper shows how to extend sparse tensor algebra compilers to introduce temporary tensors called workspaces to avoid inefficient sparse data structures accesses. We develop an intermediate representation (IR) for tensor operations called concrete index notation that specifies when sub-computations occur and where they are stored. We then describe the workspace transformation in this IR, how to programmatically invoke it, and how the IR is compiled to sparse code. Finally, we show how the transformation can be used to optimize sparse tensor kernels, including sparse matrix multiplication, sparse tensor addition, and the matricized tensor times Khatri-Rao product (MTTKRP). +

+ Our results show that the workspace transformation brings the performance of these kernels on par with hand-optimized implementations. For example, we improve the performance of MTTKRP with dense output by up to 35\%, and enable generating sparse matrix multiplication and MTTKRP with sparse output, neither of which were supported by prior tensor algebra compilers. This paper shows how to optimize sparse tensor algebraic expressions by introducing temporary tensors, called workspaces, into the resulting loop nests. We develop a new intermediate language for tensor operations called concrete index notation that extends tensor index notation. Concrete index notation expresses when and where sub-computations occur and what tensor they are stored into. We then describe the workspace optimization in this language, and how to compile it to sparse code by building on prior work in the literature. + bibtex: > + @article{kjolstad:2019:workspaces, + author = {Kjolstad, Fredrik and Ahrens, Peter and Kamil, Shoaib and Amarasinghe, Saman}, + title = {Tensor Algebra Compilation with Workspaces}, + booktitle = {Proceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization}, + series = {CGO 2019}, + year = {2019}, + isbn = {978-1-7281-1436-1}, + location = {Washington, DC, USA}, + pages = {180--192}, + numpages = {13}, + url = {http://dl.acm.org/citation.cfm?id=3314872.3314894}, + acmid = {3314894}, + publisher = {IEEE Press}, + address = {Piscataway, NJ, USA}, + keywords = {code optimization, concrete index notation, sparse tensor algebra, temporaries, workspaces}, + } +- heading: 2018 + pubs: + - title: Format Abstraction for Sparse Tensor Algebra Compilers + authors: Stephen Chou, Fredrik Kjolstad, and Saman Amarasinghe + venue: OOPSLA 2018 + is_thesis: false + paper_link: files/chou-oopsla18-taco-formats.pdf + slide_link: files/chou-oopsla18-slides.pdf + youtube: sQOq3Ci4tB0 + abstract: > + This paper shows how to build a sparse tensor algebra compiler that is agnostic to tensor formats (data layouts). We develop an interface that describes formats in terms of their capabilities and properties, and show how to build a modular code generator where new formats can be added as plugins. We then describe six implementations of the interface that compose to form the dense, CSR/CSF, COO, DIA, ELL, and HASH tensor formats and countless variants thereof. With these implementations at hand, our code generator can generate code to compute any tensor algebra expression on any combination of the aforementioned formats. +

+ To demonstrate our technique, we have implemented it in the taco tensor algebra compiler. Our modular code generator design makes it simple to add support for new tensor formats, and the performance of the generated code is competitive with hand-optimized implementations. Furthermore, by extending taco to support a wider range of formats specialized for different application and data characteristics, we can improve end-user application performance. For example, if input data is provided in the COO format, our technique allows computing a single matrix-vector multiplication directly with the data in COO, which is up to 3.6× faster than by first converting the data to CSR. + bibtex: > + @article{chou:2018:formats, + author = {Chou, Stephen and Kjolstad, Fredrik and Amarasinghe, Saman}, + title = {Format Abstraction for Sparse Tensor Algebra Compilers}, + journal = {Proc. ACM Program. Lang.}, + issue_date = {November 2018}, + volume = {2}, + number = {OOPSLA}, + month = oct, + year = {2018}, + issn = {2475-1421}, + pages = {123:1--123:30}, + articleno = {123}, + numpages = {30}, + url = {http://doi.acm.org/10.1145/3276493}, + doi = {10.1145/3276493}, + acmid = {3276493}, + publisher = {ACM}, + address = {New York, NY, USA}, + keywords = {modular code generation, sparse tensor algebra compilation, tensor formats}, + } + - title: Unified Sparse Formats for Tensor Algebra Compilers + authors: Stephen Chou + venue: SM Thesis + is_thesis: true + paper_link: files/chou-sm-thesis-taco-formats.pdf + abstract: > + Tensor algebra is a powerful tool for computing on multidimensional data and has appli-cations in many fields. Practical applications often deal with tensors that are sparse, and there exists a wide variety of formats for storing such tensors, each suited to specific typesof applications and data. Examples of sparse tensor storage formats include COO, CSR, CSC, DCSR, BCSR, CSF, CSB, ELL, DIA, and hash maps. +

+ In this thesis, we propose a levelized hierarchical abstraction that represents these seemingly disparate formats and countless others, and that hides the details of each format behind a common interface. We show that this tensor representation facilitates automatic generation of efficient compute kernels for tensor algebra expressions with any combination of formats. This is accomplished with a code generation algorithm that generates code level by level, guided by the capabilities and properties of the levels. +

+ The performance of tensor algebra kernels generated using our technique is competitive with that of equivalent hand-implemented kernels in existing sparse linear and tensor algebra libraries. Furthermore, our technique can generate many more kernels for many more formats than exist in libraries or are supported by existing compiler techniques. + bibtex: > + @MastersThesis{chou:2018:sm-thesis, + title = "Unified Sparse Formats for Tensor Algebra Compilers", + author = "Stephen Chou", + month = "Feb", + year = "2018", + url = "http://tensor-compiler.org/files/chou-sm-thesis-taco-formats.pdf", + type = "S.M. Thesis", + address = "Cambridge, MA", + school = "Massachusetts Institute of Technology", + } +- heading: 2017 + pubs: + - title: The Tensor Algebra Compiler + authors: Fredrik Kjolstad, Shoaib Kamil, Stephen Chou, David Lugato, and Saman Amarasinghe + venue: OOPSLA 2017 + is_thesis: false + paper_link: files/kjolstad-oopsla17-tensor-compiler.pdf + slide_link: files/kjolstad-oopsla17-slides.pdf + youtube: Kffbzf9etLE + abstract: > + Tensor algebra is a powerful tool with applications in machine learning, data analytics, engineering and the physical sciences. Tensors are often sparse and compound operations must frequently be computed in a single kernel for performance and to save memory. Programmers are left to write kernels for every operation of interest, with different mixes of dense and sparse tensors in different formats. The combinations are infinite, which makes it impossible to manually implement and optimize them all. This paper introduces the first compiler technique to automatically generate kernels for any compound tensor algebra operation on dense and sparse tensors. The technique is implemented in a C++ library called taco. Its performance is competitive with best-in-class hand-optimized kernels in popular libraries, while supporting far more tensor operations. + bibtex: > + @article{kjolstad:2017:taco, + author = {Kjolstad, Fredrik and Kamil, Shoaib and Chou, Stephen and Lugato, David and Amarasinghe, Saman}, + title = {The Tensor Algebra Compiler}, + journal = {Proc. ACM Program. Lang.}, + issue_date = {October 2017}, + volume = {1}, + number = {OOPSLA}, + month = oct, + year = {2017}, + issn = {2475-1421}, + pages = {77:1--77:29}, + articleno = {77}, + numpages = {29}, + url = {http://doi.acm.org/10.1145/3133901}, + doi = {10.1145/3133901}, + acmid = {3133901}, + publisher = {ACM}, + address = {New York, NY, USA}, + keywords = {code generation, iteration graphs, linear algebra, merge lattices, parallelism, performance, sparse data structures, tensor algebra, tensors} + } + - title: "taco: A Tool to Generate Tensor Algebra Kernels" + authors: Fredrik Kjolstad, Stephen Chou, David Lugato, Shoaib Kamil, and Saman Amarasinghe + venue: ASE 2017 + is_thesis: false + paper_link: files/kjolstad-ase17-taco-tools.pdf + youtube: eE38PC2ctFs + abstract: > + Tensor algebra is an important computational abstraction that is increasingly used in data analytics, machine learning, engineering, and the physical sciences. However, the number of tensor expressions is unbounded, which makes it hard to develop and optimize libraries. Furthermore, the tensors are often sparse (most components are zero), which means the code has to traverse compressed formats. To support programmers we have developed taco, a code generation tool that generates dense, sparse, and mixed kernels from tensor algebra expressions. This paper describes the taco web and command-line tools and discusses the benefits of a code generator over a traditional library. See also the demo video at tensor-compiler.org/ase2017. + bibtex: > + @inproceedings{kjolstad:2017:tools, + author={Kjolstad, Fredrik and Chou, Stephen and Lugato, David and Kamil, Shoaib and Amarasinghe, Saman}, + booktitle={2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE)}, + title={taco: A Tool to Generate Tensor Algebra Kernels}, + year={2017}, + pages={943-948}, + keywords={data analysis;learning (artificial intelligence);mathematics computing;program compilers;software libraries;tensors;code generation tool;code generator;command-line tools;compressed formats;computational abstraction;data analytics;dense kernels;machine learning;mixed kernels;physical sciences;sparse kernels;taco web;tensor algebra expressions;tensor algebra kernels;tensor expressions;Indexes;Kernel;Libraries;Linear algebra;Tensile stress;Tools;Tensor algebra;compiler;linear algebra;sparse}, + doi={10.1109/ASE.2017.8115709}, + month={Oct} + } +- heading: 2016 + pubs: + - title: An Investigation of Sparse Tensor Formats for Tensor Libraries + authors: Parker Allen Tew + venue: MEng Thesis + is_thesis: true + paper_link: files/tew-meng-thesis-sparse.pdf + abstract: > + Tensors provide a generalized structure to store arbitrary indexable data, which is applicable in fields such as chemometrics, physics simulations, signal processing and lies at the heart of machine learning. Many naturally occurring tensors are considered sparse as they contain mostly zero values. As with sparse matrices, various techniques can be employed to more efficiently store and compute on these sparse tensors. +

+ This work explores several sparse tensor formats while ultimately evaluating two implementations; one based on explicitly storing coordinates and one that compresses these coordinates. The two formats, Coordinate and CSF2, were evaluated by comparing their execution time of tensor-matrix products and the MTTKRP operation on several datasets. We find that the Coordinate format is superior for uniformly distributed sparse tensors or when used in computation that emits a sparse tensor via a mode dependent operation. In all other considered cases for large sparse tensors, the storage savings of the compressed format provide the best results. + bibtex: > + @MastersThesis{parker:2016:meng-thesis, + title = "An Investigation of Sparse Tensor Formats for Tensor Libraries", + author = "Parker Allen Tew", + month = "Jun", + year = "2016", + url = "http://tensor-compiler.org/files/tew-meng-thesis-sparse.pdf", + type = "M.Eng. Thesis", + address = "Cambridge, MA", + school = "Massachusetts Institute of Technology", + } diff --git a/_data/related.yml b/_data/related.yml new file mode 100644 index 0000000..fddab87 --- /dev/null +++ b/_data/related.yml @@ -0,0 +1,27 @@ +- heading: MLIR + link: https://mlir.llvm.org/ + desc: > + MLIR is an open-source project that provides an extensible infrastructure for building compilers for domain-specific programming languages. + MLIR provides first-class support for sparse tensor operations through the SparseTensor dialect, which the MLIR compiler can compile to LLVM IR using an implementation of TACO's sparse tensor algebra compiler theory. + pubs: + - title: Compiler Support for Sparse Tensor Computations in MLIR + authors: Aart J.C. Bik, Penporn Koanantakool, Tatiana Shpeisman, Nicolas Vasilache, Bixia Zheng, and Fredrik Kjolstad + venue: arXiv Preprint + is_thesis: false + paper_link: https://arxiv.org/abs/2202.04305 + slide_link: https://llvm.org/devmtg/2021-11/slides/2021-CompilerSupportforSparseTensorComputationsinMLIR.pdf + youtube: x-nHc3hBxHM + abstract: > + Sparse tensors arise in problems in science, engineering, machine learning, and data analytics. Programs that operate on such tensors can exploit sparsity to reduce storage requirements and computational time. Developing and maintaining sparse software by hand, however, is a complex and error-prone task. Therefore, we propose treating sparsity as a property of tensors, not a tedious implementation task, and letting a sparse compiler generate sparse code automatically from a sparsity-agnostic definition of the computation. This paper discusses integrating this idea into MLIR. + bibtex: > + @article{https://doi.org/10.48550/arxiv.2202.04305, + doi = {10.48550/ARXIV.2202.04305}, + url = {https://arxiv.org/abs/2202.04305}, + author = {Bik, Aart J. C. and Koanantakool, Penporn and Shpeisman, Tatiana and Vasilache, Nicolas and Zheng, Bixia and Kjolstad, Fredrik}, + keywords = {Programming Languages (cs.PL), FOS: Computer and information sciences, FOS: Computer and information sciences}, + title = {Compiler Support for Sparse Tensor Computations in MLIR}, + publisher = {arXiv}, + year = {2022}, + copyright = {Creative Commons Attribution 4.0 International} + } + diff --git a/_data/where_taco.yml b/_data/where_taco.yml new file mode 100644 index 0000000..e28758e --- /dev/null +++ b/_data/where_taco.yml @@ -0,0 +1,13 @@ +items: + - title: Data Analytics + img: data-analytics.png + call_to_action_name: See an example + call_to_action_link: docs/data_analytics.html + - title: Scientific Computing + img: scientific-computing.png + call_to_action_name: See an example + call_to_action_link: docs/scientific_computing.html + - title: Machine Learning + img: machine-learning.png + call_to_action_name: See an example + call_to_action_link: docs/machine_learning.html diff --git a/_data/why_taco.yml b/_data/why_taco.yml new file mode 100644 index 0000000..9739e7f --- /dev/null +++ b/_data/why_taco.yml @@ -0,0 +1,16 @@ +items: + - title: TACO is versatile! + icon: fa-wrench + description: > + TACO supports a wide range of sparse (and dense) linear/tensor algebra computations, from simpler ones like sparse matrix-vector multiplication to more complex ones like MTTKRP on higher-order sparse tensors. Tensors can be stored in a variety of storage formats, including commonly-used sparse matrix and tensor formats like CSR and COO as well as specialized formats like CSF. + - title: TACO is fast! + icon: fa-rocket + subtitle: + description: > + Under the hood, TACO employs a novel compiler-based technique to generate kernels that are optimized for the computations you want to perform. This lets TACO achieve performance that exceeds the MATLAB Tensor Toolbox by up to several orders of magnitude and that is competitive with other high-performance sparse linear/tensor algebra libraries like Eigen, Intel oneMKL, and SPLATT. + - title: TACO is easy to use! + icon: fa-coffee + description: > + TACO lets you perform complex sparse linear and tensor algebra computations by writing just a few lines of code. TACO provides C++ and Python APIs that can be used in similar ways as other linear algebra libraries like Eigen and SciPy. The command-line tool and web tool also make it easy to build your own library of custom linear/tensor algebra kernels that you can link to your applications. + #call_to_action_name: Call to action 3 + #call_to_action_link: https://www.csrhymes.com/bulma-clean-theme/page-3/ diff --git a/_includes/callouts.html b/_includes/callouts.html new file mode 100644 index 0000000..7790ac5 --- /dev/null +++ b/_includes/callouts.html @@ -0,0 +1,41 @@ +{% if page.callouts %} + {% assign callouts=site.data.[page.callouts] %} +
+
+
+

Why should I use TACO?

+
+ {% for callout in callouts.items %} +
+ {% if callout.icon %} +
+ {% if callout.icon_brand %} + + {% else %} + + {% endif %} +
+ {% endif %} +

{{ callout.title }}

+

{{ callout.subtitle }}

+ + {% if callout.description %} +
+

{{ callout.description | newline_to_br }}

+
+ {% endif %} + + {% if callout.call_to_action_name %} + + {{ callout.call_to_action_name }} + + {% endif %} +
+ {% endfor %} +
+
+
+
+{% endif %} + + diff --git a/_includes/demo-header.html b/_includes/demo-header.html new file mode 100644 index 0000000..ce32c4e --- /dev/null +++ b/_includes/demo-header.html @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/_includes/demo.html b/_includes/demo.html new file mode 100644 index 0000000..7a6e8c3 --- /dev/null +++ b/_includes/demo.html @@ -0,0 +1,164 @@ +
+
+

This is an prototype implementation of the sparse tensor algebra compiler theory and contains known bugs, which are documented here. If you find additional issues, please consider submitting a bug report.

+
Input a tensor algebra expression in index notation to generate code that computes it:
+
+
+ + + +
+
+
+ +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    + + + + + + + + + +
    +
    Tensor
    + + Format + + + (Level Formats) + + + + + +
    +
    +
    + +
    +
    +
    + + +
    + + + + + + + + + +
    + + Scheduling Command + + + + + + Arguments + +
    +
    +
    + +
    +
    +
    + + + + + +
    + + + +
    +
    +
    /* The generated compute code will appear here */
    +
    +
    +
    /* The generated assemble code will appear here */
    +
    +
    +
    /* The complete generated code will appear here */
    +
    +
    +
    +

    The generated code is provided "as is" without warranty of any kind. To help us improve TACO, we keep an anonymized record of all requests submitted to the TACO online server.

    +
    +
    + + diff --git a/_includes/footer.html b/_includes/footer.html new file mode 100644 index 0000000..4e427ce --- /dev/null +++ b/_includes/footer.html @@ -0,0 +1,21 @@ + diff --git a/_includes/head.html b/_includes/head.html new file mode 100644 index 0000000..3d18489 --- /dev/null +++ b/_includes/head.html @@ -0,0 +1,26 @@ + + + + + {% if page.header %} + {%- include {{page.header}} -%} + {% endif %} + + + + + {% unless site.hide_share_buttons %} + + {% endunless %} + {% seo %} + {% if site.feed %} + {% feed_meta %} + {% endif %} + {%- if site.google_analytics -%} + {%- include google-analytics.html -%} + {%- endif -%} + {%- include head-scripts.html -%} + + diff --git a/_includes/hero.html b/_includes/hero.html new file mode 100644 index 0000000..24fa666 --- /dev/null +++ b/_includes/hero.html @@ -0,0 +1,14 @@ +
    +
    +
    +

    {{ page.title }}

    +

    {{ page.subtitle }}

    + {% if page.hero_link1 %} + {{ page.hero_link1_text }} + {% endif %} + {% if page.hero_link2 %} + {{ page.hero_link2_text }} + {% endif %} +
    +
    +
    diff --git a/_includes/inline_callouts.html b/_includes/inline_callouts.html new file mode 100644 index 0000000..868119d --- /dev/null +++ b/_includes/inline_callouts.html @@ -0,0 +1,34 @@ +{% assign callouts=site.data.[include.callouts] %} +
    + {% for callout in callouts.items %} +
    + {% if callout.icon %} +
    + {% if callout.icon_brand %} + + {% else %} + + {% endif %} +
    + {% elsif callout.img %} + + {% endif %} +
    +

    {{ callout.title }}

    +

    {{ callout.subtitle }}

    +
    + + {% if callout.description %} +
    +

    {{ callout.description | newline_to_br }}

    +
    + {% endif %} + + {% if callout.call_to_action_name %} + + {{ callout.call_to_action_name }} + + {% endif %} +
    + {% endfor %} +
    diff --git a/_includes/publist.html b/_includes/publist.html new file mode 100644 index 0000000..edd4037 --- /dev/null +++ b/_includes/publist.html @@ -0,0 +1,49 @@ +{% assign sections=site.data.[include.pubs] %} +{% for section in sections %} +

    {% if section.link %}{% endif %}{{ section.heading }}{% if section.link %}{% endif %}

    + {% if section.desc %} +

    {{ section.desc }}

    + {% endif %} + {% for pub in section.pubs %} +
    + + {% if pub.is_thesis == true %} + + {% else %} + + {% endif %} +   + {{ pub.title }} +   + {{ pub.authors }} {% if pub.venue %}({{ pub.venue }}){% endif %} + +
    + {% if pub.paper_link %} + Download {% if pub.is_thesis == true %}Thesis{% else %}Paper{% endif %} + {% endif %} + {% if pub.slide_link %} + Download Slides + {% endif %} + {% if pub.abstract %} +

    Abstract

    +

    {{ pub.abstract }}

    + {% endif %} + {% if pub.bibtex %} +

    BibTex

    +
    {{ pub.bibtex }}
    + {% endif %} + {% if pub.youtube %} +

    Video

    +
    + +
    + {% endif %} +
    +
    + {% endfor %} +{% endfor %} diff --git a/_includes/youtube.html b/_includes/youtube.html new file mode 100644 index 0000000..8a2fd58 --- /dev/null +++ b/_includes/youtube.html @@ -0,0 +1,8 @@ +
    + +
    diff --git a/ase2017-video.html b/ase2017-video.html deleted file mode 100644 index cc37ddc..0000000 --- a/ase2017-video.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/ase2017.html b/ase2017.html deleted file mode 100644 index cc37ddc..0000000 --- a/ase2017.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/assets/css/app.scss b/assets/css/app.scss new file mode 100644 index 0000000..0002d06 --- /dev/null +++ b/assets/css/app.scss @@ -0,0 +1,20 @@ +--- +--- + +$family-primary: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif; +$primary: #ffd85c; + +// Import Main CSS file from theme +@import "main"; + +.button.is-primary[disabled] { + border-color: $primary; +} + +html { + -webkit-text-size-adjust: none; +} + +.navbar-item.is-active { + font-weight: 800; +} diff --git a/codegen.html b/codegen.html deleted file mode 100644 index ca6428c..0000000 --- a/codegen.html +++ /dev/null @@ -1,228 +0,0 @@ - - - - Try online - TACO: The Tensor Algebra Compiler - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -
    - -
    - -
    -
    -
    -
    -
    -

    This is an alpha implementation of the tensor algebra compiler theory and contains known bugs, which are documented here. If you find additional issues, please consider submitting a bug report.

    -
    Input a tensor algebra expression in index notation to generate code that computes it:
    - - - - - - - -
    -
    - - -
    -
    -
    - -
      -
      -
      -
      - - -
      -
      - -
      -
      -
      -
      -
      -
      -
      - - - - - - - - - - -
      -
      Tensor
      -
      Format 
      -
      -
      Level Formats 
      -
      (reorder dimensions by dragging the drop-down menus)
      -
      - -
      -

      - Dense levels store the size of the dimension $(N)$ and encode the coordinates in the interval $[0, N)$. - -

      -

      - Sparse levels store coordinates in a segment of the $\texttt{crd}$ array, with segment bounds stored in the $\texttt{pos}$ array. - -

      -

      - Singleton levels store individual coordinates (with no siblings) in the $\texttt{crd}$ array. - -

      -

      - A level is unique (U) if no collection of coordinates that share the same ancestors contains duplicates, and it is not unique (¬U) otherwise. -

      -

      More info on taco's tensor formats can be found here.

      -
      -
      -
      -
      -
      -
      - -
      -
      -
      -
      - - - Documentation on the scheduling language can be found here. - -
      - - - -
      -
      - - - -
      -
      -
      -
      - -
      -
      -
      -
      - - - - - -
      - - - - -
      -
      -
      -                    /* The generated compute loops will appear here */
      -                  
      -
      -
      -
      -                    /* The generated assembly loops will appear here */
      -                  
      -
      -
      -
      -                    /* The complete generated code will appear here */
      -                  
      -
      -
      -

      The generated code is provided "as is" without warranty of any kind. To help us improve taco, we keep a record of all tensor algebra expressions submitted to the taco online server.

      -
      -
      -
      - - - - -
      -
      -
      - - diff --git a/codegen.md b/codegen.md new file mode 100644 index 0000000..1faf78d --- /dev/null +++ b/codegen.md @@ -0,0 +1,8 @@ +--- +title: Web Tool +hero_height: is-small +layout: page +header: demo-header.html +--- + +{% include demo.html %} diff --git a/files/ahrens-pldi22-taco-autoscheduling.pdf b/files/ahrens-pldi22-taco-autoscheduling.pdf new file mode 100644 index 0000000..b70d878 Binary files /dev/null and b/files/ahrens-pldi22-taco-autoscheduling.pdf differ diff --git a/files/chou-arxiv-taco-dynamic.pdf b/files/chou-arxiv-taco-dynamic.pdf new file mode 100644 index 0000000..f3482e7 Binary files /dev/null and b/files/chou-arxiv-taco-dynamic.pdf differ diff --git a/files/chou-oopsla18-slides.pdf b/files/chou-oopsla18-slides.pdf new file mode 100644 index 0000000..f4318bd Binary files /dev/null and b/files/chou-oopsla18-slides.pdf differ diff --git a/chou-oopsla18-taco-formats.pdf b/files/chou-oopsla18-taco-formats.pdf similarity index 100% rename from chou-oopsla18-taco-formats.pdf rename to files/chou-oopsla18-taco-formats.pdf diff --git a/files/chou-pldi20-slides.pdf b/files/chou-pldi20-slides.pdf new file mode 100644 index 0000000..4749a56 Binary files /dev/null and b/files/chou-pldi20-slides.pdf differ diff --git a/chou-pldi20-taco-conversion.pdf b/files/chou-pldi20-taco-conversion.pdf similarity index 100% rename from chou-pldi20-taco-conversion.pdf rename to files/chou-pldi20-taco-conversion.pdf diff --git a/files/chou-sm-thesis-taco-formats.pdf b/files/chou-sm-thesis-taco-formats.pdf new file mode 100644 index 0000000..95e19a5 Binary files /dev/null and b/files/chou-sm-thesis-taco-formats.pdf differ diff --git a/files/donenfeld-cgo22-taco-compression.pdf b/files/donenfeld-cgo22-taco-compression.pdf new file mode 100644 index 0000000..f3dec8f Binary files /dev/null and b/files/donenfeld-cgo22-taco-compression.pdf differ diff --git a/files/henry-meng-thesis-taco-array.pdf b/files/henry-meng-thesis-taco-array.pdf new file mode 100644 index 0000000..8a29d9a Binary files /dev/null and b/files/henry-meng-thesis-taco-array.pdf differ diff --git a/files/henry_hsu-oopsla21-taco-array.pdf b/files/henry_hsu-oopsla21-taco-array.pdf new file mode 100644 index 0000000..d7a13e8 Binary files /dev/null and b/files/henry_hsu-oopsla21-taco-array.pdf differ diff --git a/kjolstad-ase17-tools.pdf b/files/kjolstad-ase17-taco-tools.pdf similarity index 100% rename from kjolstad-ase17-tools.pdf rename to files/kjolstad-ase17-taco-tools.pdf diff --git a/taco-workspaces.pdf b/files/kjolstad-cgo19-taco-workspaces.pdf similarity index 100% rename from taco-workspaces.pdf rename to files/kjolstad-cgo19-taco-workspaces.pdf diff --git a/files/kjolstad-oopsla17-slides.pdf b/files/kjolstad-oopsla17-slides.pdf new file mode 100644 index 0000000..892b86f Binary files /dev/null and b/files/kjolstad-oopsla17-slides.pdf differ diff --git a/kjolstad-oopsla17-tensor-compiler.pdf b/files/kjolstad-oopsla17-tensor-compiler.pdf similarity index 100% rename from kjolstad-oopsla17-tensor-compiler.pdf rename to files/kjolstad-oopsla17-tensor-compiler.pdf diff --git a/files/kjolstad-phd-thesis-taco-compiler.pdf b/files/kjolstad-phd-thesis-taco-compiler.pdf new file mode 100644 index 0000000..d438504 Binary files /dev/null and b/files/kjolstad-phd-thesis-taco-compiler.pdf differ diff --git a/files/mueller-meng-thesis-taco-transposition.pdf b/files/mueller-meng-thesis-taco-transposition.pdf new file mode 100644 index 0000000..d7b567e Binary files /dev/null and b/files/mueller-meng-thesis-taco-transposition.pdf differ diff --git a/mueller-spaa20-taco-transpositions.pdf b/files/mueller-spaa20-taco-transpositions.pdf similarity index 100% rename from mueller-spaa20-taco-transpositions.pdf rename to files/mueller-spaa20-taco-transpositions.pdf diff --git a/files/noyola-meng-thesis-taco-interface.pdf b/files/noyola-meng-thesis-taco-interface.pdf new file mode 100644 index 0000000..79b2cb7 Binary files /dev/null and b/files/noyola-meng-thesis-taco-interface.pdf differ diff --git a/files/senanayake-meng-thesis-taco-scheduling.pdf b/files/senanayake-meng-thesis-taco-scheduling.pdf new file mode 100644 index 0000000..29b3065 Binary files /dev/null and b/files/senanayake-meng-thesis-taco-scheduling.pdf differ diff --git a/senanayake-oopsla20-taco-scheduling.pdf b/files/senanayake-oopsla20-taco-scheduling.pdf similarity index 100% rename from senanayake-oopsla20-taco-scheduling.pdf rename to files/senanayake-oopsla20-taco-scheduling.pdf diff --git a/files/shinde-meng-thesis-taco-distributed.pdf b/files/shinde-meng-thesis-taco-distributed.pdf new file mode 100644 index 0000000..1ac227f Binary files /dev/null and b/files/shinde-meng-thesis-taco-distributed.pdf differ diff --git a/files/tew-meng-thesis-sparse.pdf b/files/tew-meng-thesis-sparse.pdf new file mode 100644 index 0000000..57a530b Binary files /dev/null and b/files/tew-meng-thesis-sparse.pdf differ diff --git a/files/wang-meng-thesis-taco-autoscheduling.pdf b/files/wang-meng-thesis-taco-autoscheduling.pdf new file mode 100644 index 0000000..e24139b Binary files /dev/null and b/files/wang-meng-thesis-taco-autoscheduling.pdf differ diff --git a/files/yadav-pldi22-distal.pdf b/files/yadav-pldi22-distal.pdf new file mode 100644 index 0000000..686158c Binary files /dev/null and b/files/yadav-pldi22-distal.pdf differ diff --git a/images/coffee.jpg b/images/coffee.jpg deleted file mode 100644 index 9c51223..0000000 Binary files a/images/coffee.jpg and /dev/null differ diff --git a/images/data-analytics.png b/images/data-analytics.png new file mode 100644 index 0000000..6d46eed Binary files /dev/null and b/images/data-analytics.png differ diff --git a/images/data_analytics_thumbnail.jpg b/images/data_analytics_thumbnail.jpg deleted file mode 100644 index 5b9487e..0000000 Binary files a/images/data_analytics_thumbnail.jpg and /dev/null differ diff --git a/images/data_analytics_thumbnail.png b/images/data_analytics_thumbnail.png deleted file mode 100644 index 5206463..0000000 Binary files a/images/data_analytics_thumbnail.png and /dev/null differ diff --git a/images/data_analytics_thumbnail1.png b/images/data_analytics_thumbnail1.png deleted file mode 100644 index 63223c5..0000000 Binary files a/images/data_analytics_thumbnail1.png and /dev/null differ diff --git a/images/database-2025620_960_720.png b/images/database-2025620_960_720.png deleted file mode 100644 index e8f9523..0000000 Binary files a/images/database-2025620_960_720.png and /dev/null differ diff --git a/images/easy.png b/images/easy.png deleted file mode 100755 index cfc43af..0000000 Binary files a/images/easy.png and /dev/null differ diff --git a/images/easy1.png b/images/easy1.png deleted file mode 100755 index ecaf1c1..0000000 Binary files a/images/easy1.png and /dev/null differ diff --git a/images/fast.png b/images/fast.png deleted file mode 100755 index a8a727b..0000000 Binary files a/images/fast.png and /dev/null differ diff --git a/images/fast0.png b/images/fast0.png deleted file mode 100755 index 96491db..0000000 Binary files a/images/fast0.png and /dev/null differ diff --git a/images/fast1.png b/images/fast1.png deleted file mode 100755 index 9adcf70..0000000 Binary files a/images/fast1.png and /dev/null differ diff --git a/images/imac.png b/images/imac.png deleted file mode 100644 index f224064..0000000 Binary files a/images/imac.png and /dev/null differ diff --git a/images/machine-learning.png b/images/machine-learning.png new file mode 100644 index 0000000..2920ed4 Binary files /dev/null and b/images/machine-learning.png differ diff --git a/images/machine_learning_thumbnail.jpg b/images/machine_learning_thumbnail.jpg deleted file mode 100644 index 85589aa..0000000 Binary files a/images/machine_learning_thumbnail.jpg and /dev/null differ diff --git a/images/machine_learning_thumbnail.png b/images/machine_learning_thumbnail.png deleted file mode 100644 index b4b25a6..0000000 Binary files a/images/machine_learning_thumbnail.png and /dev/null differ diff --git a/images/machine_learning_thumbnail1.png b/images/machine_learning_thumbnail1.png deleted file mode 100644 index 7361d08..0000000 Binary files a/images/machine_learning_thumbnail1.png and /dev/null differ diff --git a/images/mit_tensor_algebra.jpg b/images/mit_tensor_algebra.jpg deleted file mode 100644 index 2389cfd..0000000 Binary files a/images/mit_tensor_algebra.jpg and /dev/null differ diff --git a/images/monitor.jpg b/images/monitor.jpg deleted file mode 100644 index b92bca2..0000000 Binary files a/images/monitor.jpg and /dev/null differ diff --git a/images/old_performance_engineering_thumbnail.png b/images/old_performance_engineering_thumbnail.png deleted file mode 100644 index 5a1ed42..0000000 Binary files a/images/old_performance_engineering_thumbnail.png and /dev/null differ diff --git a/images/performance_engineering_thumbnail.jpg b/images/performance_engineering_thumbnail.jpg deleted file mode 100644 index 5f67fa9..0000000 Binary files a/images/performance_engineering_thumbnail.jpg and /dev/null differ diff --git a/images/performance_engineering_thumbnail.png b/images/performance_engineering_thumbnail.png deleted file mode 100644 index 1243053..0000000 Binary files a/images/performance_engineering_thumbnail.png and /dev/null differ diff --git a/images/scientific-computing.png b/images/scientific-computing.png new file mode 100644 index 0000000..9444512 Binary files /dev/null and b/images/scientific-computing.png differ diff --git a/images/scientific_computing_thumbnail.png b/images/scientific_computing_thumbnail.png deleted file mode 100644 index c091c0e..0000000 Binary files a/images/scientific_computing_thumbnail.png and /dev/null differ diff --git a/images/space.png b/images/space.png deleted file mode 100644 index 06b088f..0000000 Binary files a/images/space.png and /dev/null differ diff --git a/images/speed.png b/images/speed.png deleted file mode 100644 index 4a3e15c..0000000 Binary files a/images/speed.png and /dev/null differ diff --git a/images/startup.png b/images/startup.png deleted file mode 100644 index 188cdda..0000000 Binary files a/images/startup.png and /dev/null differ diff --git a/images/swissknife.svg b/images/swissknife.svg deleted file mode 100644 index b1eb656..0000000 --- a/images/swissknife.svg +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/images/taco-small.png b/images/taco-small.png deleted file mode 100644 index 9cb6ea4..0000000 Binary files a/images/taco-small.png and /dev/null differ diff --git a/images/taco.png b/images/taco.png deleted file mode 100644 index e50d30f..0000000 Binary files a/images/taco.png and /dev/null differ diff --git a/images/versatile.png b/images/versatile.png deleted file mode 100755 index 07e950b..0000000 Binary files a/images/versatile.png and /dev/null differ diff --git a/images/versatile1.png b/images/versatile1.png deleted file mode 100755 index 44e0c0f..0000000 Binary files a/images/versatile1.png and /dev/null differ diff --git a/index.html b/index.html deleted file mode 100644 index 9d16e82..0000000 --- a/index.html +++ /dev/null @@ -1,259 +0,0 @@ - - - - TACO: The Tensor Algebra Compiler - - - - - - - - - -
      -
      - -
      - -
      -
      -
      - -
      -

      What can TACO be used for?

      -
      -
      - -
      -
      -

      Scientific Computing

      -
      - -
      -
      -
      - -
      -
      -

      Machine Learning

      -
      - -
      -
      -
      - -
      -
      -

      Data Analytics

      -
      - -
      -
      -
      - -
      -
      -

      Performance Engineering

      -
      - -
      -
      -
      -

      Why should I use TACO? -

      -
      -
      -
      -
      -
      -

      TACO is fast

      -

      Under the hood, the TACO library employs a novel compiler-based technique to generate kernels that are optimized for the computations you want to perform. This enables TACO to achieve performance that exceeds the MATLAB Tensor Toolbox by up to several orders of magnitude and that is competitive with other high-performance sparse linear and tensor algebra libraries like Eigen, Intel MKL, and SPLATT.

      -
      -
      -
      -
      - -
      -
      -
      - -
      -
      -
      - -
      -
      -
      -
      -

      TACO is versatile

      -

      The compiler-based technique that underlies TACO enables it to support a wide variety of linear and tensor algebra operations, ranging from simpler ones like sparse matrix-vector multiplication to more complex ones like MTTKRP on tensors of any order. Tensors can be stored in a wide range of storage formats, including many commonly used sparse matrix and tensor formats such as CSR. -

      -
      -
      -
      - -
      -
      -
      -

      TACO is easy to use

      -

      With TACO, you can define even complex tensor algebra computations on dense and sparse tensors in just a couple of lines of C++ or Python code using tensor index notation. The TACO library takes care of generating the potentially very complicated kernels that are needed to perform your desired computations.

      -
      -
      -
      -
      - -
      -
      -
      - -
      -
      -

      Media

      -
      - - - - - - -
      -
      -
      -

      We're in the news!

      -
      - -
      -
      -
      -

      Acknowledgements

      -
      -
      -

      TACO is developed by members of the Commit research group in MIT CSAIL and is built on work supported by the National Science Foundation under Grant No. CCF-1533753, by the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research under Award Numbers DE-SC008923 and DE-SC014204, by the Direction Générale de l'Armement (Projet ERE 2016929), and by the Toyota Research Institute.

      -
      -
      - - -
      -
      -
      - - diff --git a/index.md b/index.md new file mode 100644 index 0000000..88ecfc9 --- /dev/null +++ b/index.md @@ -0,0 +1,43 @@ +--- +title: "TACO: The Tensor Algebra Compiler" +subtitle: A fast and versatile compiler-based library for sparse linear and tensor algebra +hero_link1: codegen.html +hero_link1_text: Try online +hero_link2: https://github.com/tensor-compiler/taco +hero_link2_text: Download from GitHub +hero_height: "" +layout: page +--- + +# What can I use TACO for? + +TACO can be used to implement sparse linear and tensor algebra applications in a wide range of domains, including---but not limited to---the following: + +{% include inline_callouts.html callouts="where_taco" %} + +# Why should I use TACO? + +{% include inline_callouts.html callouts="why_taco" %} + +# How can I start using TACO? + +The TACO code base is hosted on [GitHub](https://github.com/tensor-compiler/taco) and can be downloaded from there. +The code base includes a README that describes how to build the C++ and Python APIs and the command-line tool. + +The [online documentation](docs/index.html) describes how to use the C++ and Python APIs as well as includes some example programs that show how TACO can be used. +The command-line tool also includes a help menu that documents all of its features; you can access the help menu by invoking the tool with the `--help` option. + +You can also use TACO as a code generator [directly within your browser](codegen.html) without having to download it. + +# How can I contribute to TACO? + +If you encounter any bugs while using TACO or if you have any suggestions for improvements, please consider [creating an issue on GitHub](https://github.com/tensor-compiler/taco/issues). + +We also [welcome pull requests](https://github.com/tensor-compiler/taco/pulls) if you would like to actively contribute by fixing bugs or implementing new features in TACO! + +# Acknowledgements + +TACO is developed and maintained by members of [Prof. Fredrik Kjolstad](http://fredrikbk.com/)'s research group at Stanford University, members of the [COMMIT research group](http://groups.csail.mit.edu/commit/) (led by Prof. Saman Amarasinghe) at MIT CSAIL, and [other contributors](https://github.com/tensor-compiler/taco/graphs/contributors). + +TACO is built on research supported by the National Science Foundation; the U.S. Department of Energy, Office of Science, Office of Advanced Scientific Computing Research; the Direction Générale de l'Armement; the Toyota Research Institute; the Application Driving Architectures (ADA) Research Center, a JUMP Center co-sponsored by SRC and DARPA; the Defense Advanced Research Projects Agency; the Google Research Scholar Program; and the Stanford Data Analytics for What’s Next (DAWN) Affiliate Program. +Any opinions, findings, and conclusions or recommendations expressed here are those of the developers of TACO and do not necessarily reflect the views of the aforementioned funding agencies. diff --git a/javascripts/demo.js b/javascripts/demo.js index 8ee5038..6441fa1 100644 --- a/javascripts/demo.js +++ b/javascripts/demo.js @@ -3,7 +3,10 @@ function demo() { input: { expression: "", tensorOrders: {}, - error: "", + error: { + message: "", + delay: 0 + }, indices: [], prefix: "" }, @@ -25,69 +28,70 @@ function demo() { addInputView: function(newView) { model.inputViews.push(newView); - newView(400); + newView(); }, updateInputViews: function() { for (v in model.inputViews) { - model.inputViews[v](400); + model.inputViews[v](); } }, updateScheduleView: function() { model.removeInvalidIndices(); model.removeInvalidAccesses(); - model.scheduleView(0); + model.scheduleView(); }, addExampleScheduleView: function(newView) { model.exampleScheduleViews.push(newView); - newView(0); + newView(); }, updateExampleScheduleViews: function() { for (v in model.exampleScheduleViews) { - model.exampleScheduleViews[v](0); + model.exampleScheduleViews[v](); } }, addOutputView: function(newView) { model.outputViews.push(newView); - newView(0); + newView(); }, updateOutputViews: function() { for (v in model.outputViews) { - model.outputViews[v](0); + model.outputViews[v](); } }, addReqView: function(newView) { model.reqViews.push(newView); - newView(0); + newView(); }, updateReqViews: function() { for (v in model.reqViews) { - model.reqViews[v](0); + model.reqViews[v](); } }, - setInput: function(expression) { + setInput: function(expression, errorDelay = 400) { model.cancelReq(); model.setOutput("", "", "", ""); model.input.expression = expression; + model.input.error.delay = errorDelay; if (model.input.expression.length > 256) { model.input.tensorOrders = {}; - model.input.error = "Input expression is too long"; + model.input.error.message = "Input expression is too long"; } else { try { model.input.tensorOrders = parser.parse(expression); model.input.indices = [...new Set(parser_indices.parse(expression))]; - model.input.error = ""; + model.input.error.message = ""; for (t in model.input.tensorOrders) { if (model.input.tensorOrders[t] < 0) { model.input.tensorOrders = {}; - model.input.error = "Tensor " + t + " has inconsistent order"; + model.input.error.message = "Tensor " + t + " has inconsistent order"; break; } } } catch (e) { model.input.tensorOrders = {}; - model.input.error = "Input expression is invalid"; + model.input.error.message = "Input expression is invalid"; } } model.updateInputViews(); @@ -116,9 +120,6 @@ function demo() { model.setReq(null); } }, - getError: function() { - return (model.output.error !== "") ? model.output.error : model.input.error; - }, setExampleSchedule: function(e) { model.exampleSchedule = e; @@ -266,18 +267,39 @@ function demo() { var txtExprView = { timerEvent: null, - - updateView: function(timeout) { - clearTimeout(txtExprView.timerEvent); - if (model.getError() !== "") { - var markError = function() { - $("#lblError").html(model.getError()); - $("#txtExpr").parent().addClass('is-invalid'); - }; - txtExprView.timerEvent = setTimeout(markError, timeout); + errorMsg: "", + lastInput: "", + + updateView: function() { + var currInput = $("#txtExpr").val(); + if (model.output.error !== "") { + clearTimeout(txtExprView.timerEvent); + txtExprView.errorMsg = model.output.error; + $("#txtExpr").parent().addClass('is-invalid'); + $("#txtExpr").addClass('is-danger'); + } else if (model.input.error.message !== "") { + if (model.input.error.message !== txtExprView.errorMsg || + txtExprView.lastInput != currInput) { + clearTimeout(txtExprView.timerEvent); + txtExprView.errorMsg = model.input.error.message; + var markError = function() { + $("#txtExpr").parent().addClass('is-invalid'); + $("#txtExpr").addClass('is-danger'); + txtExprView.errorMsg = ""; + }; + txtExprView.timerEvent = setTimeout(markError, model.input.error.delay); + } else { + $("#txtExpr").parent().removeClass('is-invalid'); + $("#txtExpr").removeClass('is-danger'); + } } else { + clearTimeout(txtExprView.timerEvent); + txtExprView.errorMsg = ""; $("#txtExpr").parent().removeClass('is-invalid'); + $("#txtExpr").removeClass('is-danger'); } + $("#lblError").html(txtExprView.errorMsg); + txtExprView.lastInput = currInput; } }; @@ -388,15 +410,15 @@ function demo() { return ""; } }, - updateView: function(timeout) { + updateView: function() { clearTimeout(tblFormatsView.timerEvent); - if (model.getError() !== "") { + if (model.input.error.message !== "") { var hideTables = function() { $("#tblFormats").hide(); $("#tblSchedule").hide(); model.resetSchedule(); }; - tblFormatsView.timerEvent = setTimeout(hideTables, timeout); + tblFormatsView.timerEvent = setTimeout(hideTables, model.input.error.delay); } else { var listTensorsBody = ""; for (t in model.input.tensorOrders) { @@ -415,44 +437,40 @@ function demo() { listTensorsBody += ""; listTensorsBody += "
      "; + listTensorsBody += "width=\"100\" style=\"vertical-align: middle; "; + listTensorsBody += "padding-left: 9px\">
      "; listTensorsBody += t; listTensorsBody += "
      "; listTensorsBody += ""; - listTensorsBody += "
      "; - listTensorsBody += ""; - listTensorsBody += ""; - listTensorsBody += ""; - listTensorsBody += "
      "; + listTensorsBody += "
      "; - listTensorsBody += ""; listTensorsBody += ""; + listTensorsBody += "\">"; + listTensorsBody += "
      "; + listTensorsBody += "Dense"; + listTensorsBody += "
      "; + listTensorsBody += ""; + listTensorsBody += "
      Compressed
      (w/ Unique Elements)
      "; + listTensorsBody += ""; + listTensorsBody += "
      Compressed
      (w/ Duplicate Elements)
      "; + listTensorsBody += "
      "; + listTensorsBody += ""; + listTensorsBody += "
      Singleton
      (w/ Unique Elements)
      "; + listTensorsBody += ""; + listTensorsBody += "
      Singleton
      (w/ Duplicate Elements)
      "; + listTensorsBody += "
      "; } - listTensorsBody += ""; + listTensorsBody += ""; } } if (listTensorsBody !== "") { $("#listTensors").html(listTensorsBody); - getmdlSelect.init(".getmdl-select"); $(".sortable").sortable({ + // From https://stackoverflow.com/questions/2451528/jquery-ui-sortable-scroll-helper-element-offset-firefox-issue + sort: function(ev, ui) { + var $target = $(ev.target); + if (!/html|body/i.test($target.offsetParent()[0].tagName)) { + var top = ev.pageY - $target.offsetParent().offset().top - (ui.helper.outerHeight(true) / 2); + ui.helper.css({'top' : top + 'px'}); + } + }, update: function(ev, ui) { var listId = ui.item.parent().attr('id'); var id = ui.item.context.id; @@ -523,7 +541,8 @@ function demo() { var entry = tblFormatsView.createEntryFromId(listId); var name = tblFormatsView.getFormatName(entry, model.input.tensorOrders[tensor]); - $("#format" + tensor).val(name); + + $("#format" + tensor).html(name); tblFormatsView.insertNamesCacheEntry(tensor, name); model.cancelReq(); @@ -533,20 +552,20 @@ function demo() { function updateCache(selectParent, val) { var selectId = selectParent.attr('for'); - var listId = selectParent.parent().parent().parent().attr('id'); + var listId = selectParent.parent().parent().parent().parent().attr('id'); var tensor = listId.replace("dims", ""); var level = tblFormatsView.getLevelFormatString(val); level = level.replace("¬", $("
      ").html("¬").text()); - $("#" + selectId).val(level); + $("#" + selectId + " > .dropdown-trigger > .button > .level-format-label").html(level); $("#" + selectId).attr('data-val', val); var tensor = listId.substring(4); var entry = tblFormatsView.createEntryFromId(listId); var name = tblFormatsView.getFormatName(entry, model.input.tensorOrders[tensor]); - $("#format" + tensor).val(name); + $("#format" + tensor).html(name); tblFormatsView.insertNamesCacheEntry(tensor, name); tblFormatsView.insertLevelsCacheEntry(tensor, entry); @@ -556,42 +575,14 @@ function demo() { for (t in model.input.tensorOrders) { if (model.input.tensorOrders[t] > 0) { - tblFormatsView.insertNamesCacheEntry(t, $("#format" + t).val()); + tblFormatsView.insertNamesCacheEntry(t, $("#format" + t).html()); tblFormatsView.insertLevelsCacheEntry(t, tblFormatsView.createEntryFromId("dims" + t)); } } - $('.dropdown-submenu a').on("mouseover", function(e){ - $(this).next('ul').show(); - }); - - $('.sparse').on("mouseleave", function(e) { - $(this).find('ul').hide(); - }); - - $('.singleton').on("mouseleave", function(e) { - $(this).find('ul').hide(); - }); - - $(".dense a").on("click", function(e){ - var selectParent = $(this).parent().parent(); - var val = $(this).attr("data-val"); - updateCache(selectParent, val); - }); - - $('.dropdown-submenu .dropdown-menu a').on("click", function(e) { - var selectParent = $(this).parent().parent().parent().parent(); - var val = $(this).attr("data-val"); - updateCache(selectParent, val); - }); - - $(".formats a").each(function() { - $(this).click(function() { - var formatParent = $(this).parent().parent(); - var formatId = formatParent.attr('for'); - $("#" + formatId).val($(this).text()); - + $(".formats > a").each(function() { + $(this).mousedown(function() { var id = $(this).attr('id'); var tensor = id.substring(6, id.indexOf("_")); var name = id.substring(id.indexOf("_") + 1); @@ -606,6 +597,33 @@ function demo() { }); }); + $(".level-formats > a").each(function() { + $(this).mousedown(function() { + var selectParent = $(this).parent().parent(); + var val = $(this).attr("data-val"); + updateCache(selectParent, val); + }); + }); + + $(".dropdown-item").mousedown(function() { + var dropdown = $(this).parents('.dropdown'); + dropdown.removeClass('is-active'); + }); + + $(".format-dropdown .button").click(function() { + var dropdown = $(this).parents('.dropdown'); + dropdown.toggleClass('is-active'); + }); + + $(".format-dropdown .button").each(function() { + var dropdown = $(this).parents('.dropdown'); + document.addEventListener("click", function(ev) { + if (!dropdown[0].contains(ev.target)) { + dropdown.removeClass('is-active'); + } + }); + }); + $("#tblFormats").show(); } else { $("#tblFormats").hide(); @@ -616,55 +634,55 @@ function demo() { var scheduleCommands = { pos: { - parameters: ["Original IndexVar", "Derived IndexVar", "Accessed Tensor"], + parameters: ["Original Index Variable", "Derived Index Variable", "Accessed Tensor"], 0: ["index dropdown", [1, "pos"]], 1: ["default", ""], 2: ["access dropdown"] }, fuse: { - parameters: ["Outer IndexVar", "Inner IndexVar", "Fused IndexVar"], + parameters: ["Outer Index Variable", "Inner Index Variable", "Fused Index Variable"], 0: ["index dropdown"], 1: ["index dropdown"], 2: ["default", "f"] }, split: { - parameters: ["Split IndexVar", "Outer IndexVar", "Inner IndexVar", "Split Factor"], + parameters: ["Split Index Variable", "Outer Index Variable", "Inner Index Variable", "Split Factor"], 0: ["index dropdown", [1, "0"], [2, "1"]], 1: ["default", ""], 2: ["default", ""], 3: ["text"] }, divide: { - parameters: ["Divided IndexVar", "Outer IndexVar", "Inner IndexVar", "Divide Factor"], + parameters: ["Divided Index Variable", "Outer Index Variable", "Inner Index Variable", "Divide Factor"], 0: ["index dropdown", [1, "0"], [2, "1"]], 1: ["default", ""], 2: ["default", ""], 3: ["text"] }, precompute: { - parameters: ["Precomputed Expr", "Original IndexVar", "Workspace IndexVar"], + parameters: ["Precomputed Expression", "Original Index Variable", "Workspace Index Variable"], 0: ["long text"], 1: ["index dropdown", [2, ""]], 2: ["default", ""] }, reorder: { - parameters: ["Reordered IndexVar"], + parameters: ["Index Variable"], 0: ["index dropdown"] }, bound: { - parameters: ["Original IndexVar", "Bounded IndexVar", "Bound", "Bound Type"], + parameters: ["Original Index Variable", "Bounded Index Variable", "Bound", "Bound Type"], 0: ["index dropdown", [1, "bound"]], 1: ["default", ""], 2: ["text"], 3: ["predefined dropdown", "Max Exact", "Min Exact", "Min Constraint", "Max Exact", "Max Constraint"] }, unroll: { - parameters: ["Unrolled IndexVar", "Unroll Factor"], + parameters: ["Unrolled Index Variable", "Unroll Factor"], 0: ["index dropdown"], 1: ["text"] }, parallelize: { - parameters: ["Parallel IndexVar", "Hardware", "Race Strategy"], + parameters: ["Parallelized Index Variable", "Hardware", "Race Strategy"], 0: ["index dropdown"], 1: ["predefined dropdown", "CPU Thread", "Not Parallel", "CPU Thread", "CPU Vector", @@ -684,49 +702,45 @@ function demo() { makeParameters: function(row, command) { // a normal textfield function empty(parameterName, inputId, input, long = false) { - var parameter = "
    • "; - parameter += "
      "; + parameter += ""; + parameter += "
        "; + parameter += "\">"; parameter += "
      • "; return parameter; } function dropdown(paramterName, inputId, input, defaultValue = "", useMonospace = true, length = "120px") { - var parameter = "
      • "; - parameter += "
      • "; + parameter += ""; - parameter += ""; - parameter += "
          "; + parameter += "
          "; + parameter += "
          "; + parameter += "
          "; return parameter; } @@ -734,12 +748,11 @@ function demo() { function indexDropdown(parameterName, inputId, input) { var parameter = dropdown(parameterName, inputId, input); for (var index of model.getIndices(row)) { - parameter += "
        • "; + parameter += ""; parameter += index; - parameter += "
        • "; + parameter += ""; } - - parameter += "
      • "; + parameter += ""; return parameter; } @@ -749,12 +762,12 @@ function demo() { for (var access in model.input.tensorOrders) { if (model.input.tensorOrders[access] > 0 && model.input.expression.indexOf(access) > model.input.expression.indexOf("=")) { - parameter += "
      • "; + parameter += ""; parameter += access; - parameter += "
      • "; + parameter += ""; } } - parameter += ""; + parameter += ""; return parameter; } @@ -765,16 +778,16 @@ function demo() { for (var access in model.input.tensorOrders) { if (model.input.tensorOrders[access] > 0 && model.input.expression.indexOf(access) <= model.input.expression.indexOf("=")) { - parameter += "
      • "; + parameter += ""; parameter += access; - parameter += "
      • "; + parameter += ""; if (defaultParam === "") { defaultParam += access; } } } - parameter = dropdown(parameterName, inputId, input, defaultParam) - + parameter + ""; + parameter = dropdown(parameterName, inputId, input, defaultParam) + parameter; + parameter += ""; return parameter; } @@ -782,25 +795,30 @@ function demo() { function predefinedDropdown(parameterName, inputId, input, options) { var parameter = dropdown(parameterName, inputId, input, options[0], false, "160px"); for (var option of options.slice(1)) { - parameter += "
      • "; + parameter += ""; parameter += option; - parameter += "
      • "; + parameter += ""; } - parameter += ""; + parameter += ""; return parameter; } var commandInfo = scheduleCommands[command]; var parametersList = commandInfo.parameters; - var parameters = ""; - row += ""; + row += ""; if (command) { + row += "
        "; row += tblScheduleView.makeParameters(r, command); + row += "
        "; } - row += ""; + row += ""; scheduleBody += row; } + scheduleBody += ""; + scheduleBody += ""; + scheduleBody += ""; if (scheduleBody !== "") { $("#tblSchedule").html(scheduleBody); - getmdlSelect.init(".getmdl-select"); $("#tblSchedule").show(); } else { $("#tblSchedule").hide(); } - $(".commands a").on("click", function(e) { - var command = $(this).text(); - var rowId = $(this).parent().parent().attr("for"); - var row = rowId.substring(("schedule").length); + $("#btnSchedule").click(function() { + model.addScheduleRow(); + }); + + $(".schedule-command-select a").each(function() { + $(this).mousedown(function() { + var command = $(this).text(); + var rowId = $(this).parent().parent().attr("for"); + var row = rowId.substring(("schedule").length); + + $("#" + rowId).val(command); + model.addScheduleCommand(row, command); + }); + }); + + $(".dropdown-item").mousedown(function() { + var dropdown = $(this).parents('.dropdown'); + dropdown.removeClass('is-active'); + }); - $("#" + rowId).val(command); - model.addScheduleCommand(row, command); + $(".schedule-dropdown .button").click(function() { + var dropdown = $(this).parents('.schedule-dropdown'); + dropdown.toggleClass('is-active'); + }); + + $(".schedule-dropdown .button").each(function() { + var dropdown = $(this).parents('.schedule-dropdown'); + document.addEventListener("click", function(ev) { + if (!dropdown[0].contains(ev.target)) { + dropdown.removeClass('is-active'); + } + }); }); $(".schedule-input input").on("change", function(e) { @@ -916,7 +968,7 @@ function demo() { model.addScheduleParameter(row, index, $(this).val()); }); - $(".options a").on("click", function(e) { + $(".schedule-param-select a").on("mousedown", function(e) { var option = $(this).text(); var inputId = $(this).parent().parent().attr("for"); var row = inputId[inputId.indexOf("-") - 1]; @@ -925,14 +977,14 @@ function demo() { model.addScheduleParameter(row, index, option); }); - $("tbody").sortable({ - start: function(ev, ui) { - ui.item.startPos = ui.item.index(); - }, - update: function(ev, ui) { - model.swapScheduleRows(ui.item.startPos, ui.item.index()); - } - }); + //$("tbody").sortable({ + // start: function(ev, ui) { + // ui.item.startPos = ui.item.index(); + // }, + // update: function(ev, ui) { + // model.swapScheduleRows(ui.item.startPos, ui.item.index()); + // } + //}); $(".removable-row").each(function() { $(this).click(function() { @@ -953,16 +1005,16 @@ function demo() { model.scheduleView = tblScheduleView.updateView; var btnExampleScheduleView = { - updateView: function(timeout) { + updateView: function() { if (model.exampleSchedule.length === 0) { - $("#btnDefaults").hide(); + $("#btnCPU").hide(); + $("#btnGPU").hide(); } else { - $("#btnDefaults").show(); + $("#btnCPU").show(); $("#btnCPU").attr('data-val', model.exampleSchedule); - $("#btnCPU").text(model.exampleSchedule + " CPU"); + $("#btnGPU").show(); $("#btnGPU").attr('data-val', model.exampleSchedule); - $("#btnGPU").text(model.exampleSchedule + " GPU"); } } }; @@ -970,9 +1022,13 @@ function demo() { model.addExampleScheduleView(btnExampleScheduleView.updateView); var btnGetKernelView = { - updateView: function(timeout) { - $("#btnGetKernel").prop('disabled', model.input.error !== "" || model.req); - $("#btnGetKernel").html(model.req ? "Processing..." : "Generate Kernel"); + updateView: function() { + $("#btnGetKernel").prop('disabled', model.input.error.message !== "" || model.req); + if (model.req) { + $("#btnGetKernel").addClass("is-loading"); + } else { + $("#btnGetKernel").removeClass("is-loading"); + } } }; @@ -980,19 +1036,19 @@ function demo() { model.addInputView(tblFormatsView.updateView); model.addInputView(btnGetKernelView.updateView); - $("#txtExpr").keyup(function() { + $("#txtExpr").on("input", function() { model.setInput($("#txtExpr").val()); model.resetSchedule(); model.setExampleSchedule(""); }); var panelKernelsView = { - updateView: function(timeout) { + updateView: function() { var computeLoops = (model.output.computeLoops === "") ? - "/* The generated compute loops will appear here */" : + "/* The generated compute code will appear here */" : model.output.computeLoops.replace(/"; + listExamplesBody += "\" class=\"mdl-menu__item\">
        "; + listExamplesBody += examples[e].name; + listExamplesBody += "
        "; listExamplesBody += examples[e].name; - listExamplesBody += ":  "; + listExamplesBody += ":  "; listExamplesBody += examples[e].code; - listExamplesBody += ""; + listExamplesBody += "
        "; } $("#listExamples").html(listExamplesBody); + $("#btnExamples").click(function() { + if ($(window).width() > 480) { + $("#listExamples .long-name").css("display", "block"); + $("#listExamples .short-name").css("display", "none"); + } else { + $("#listExamples .long-name").css("display", "none"); + $("#listExamples .short-name").css("display", "block"); + } + }); + var getURLParam = function(k) { var url = window.location.search.substring(1); var params = url.split('&'); @@ -1195,8 +1263,11 @@ function demo() { }; var inited = false; + var validInit = true; var expr = getURLParam("expr"); if (expr !== "") { + inited = true; + var formats = getURLParam("format").split(";"); for (var f in formats) { var [tensor, levelFormats, ordering] = formats[f].split(":"); @@ -1209,21 +1280,32 @@ function demo() { } expr = expr.replaceAll("%20", " "); - model.setInput(expr); + model.setInput(expr, 0); $("#txtExpr").val(expr); - inited = (model.error == null); - - var schedule = []; - var scheduleString = getURLParam("sched"); - if (scheduleString !== "") { - var commands = scheduleString.split(";"); - for (var c in commands) { - var [transform, ...args] = commands[c].split(":").map(function(x) { return x.replaceAll("%20", " "); }); - command = { command: transform, parameters: args }; - schedule.push(command); + validInit = (model.input.error.message === ""); + + if (validInit) { + var schedule = []; + var scheduleString = getURLParam("sched"); + if (scheduleString !== "") { + var commands = scheduleString.split(";"); + for (var c in commands) { + var [transform, ...args] = commands[c].split(":").map(function(x) { + return x.replaceAll("%20", " "); + }); + command = { command: transform, parameters: args }; + if (!scheduleCommands.hasOwnProperty(transform)) { + model.setOutput("", "", "", "Invalid scheduling command: " + transform); + validInit = false; + break; + } + schedule.push(command); + } + } + if (validInit) { + model.setSchedule(schedule); } } - model.setSchedule(schedule); } var demo = getURLParam("demo"); @@ -1256,7 +1338,9 @@ function demo() { } if (inited) { - getKernel(); + if (validInit) { + getKernel(); + } } else { var urlPrefix = "http://tensor-compiler.org/examples/" + demo; var computeGet = $.get(urlPrefix + "_compute.c"); @@ -1269,10 +1353,6 @@ function demo() { }); } - $("#btnSchedule").click(function() { - model.addScheduleRow(); - }); - $("#btnCPU").click(function() { model.setSchedule(default_CPU_schedules[$(this).attr('data-val')]); }); @@ -1284,4 +1364,48 @@ function demo() { $("#prefix").keyup(function() { model.setPrefix($("#prefix").val()); }); + + document.addEventListener('DOMContentLoaded', () => { + // Functions to open and close a modal + function openModal($el) { + $el.classList.add('is-active'); + } + + function closeModal($el) { + $el.classList.remove('is-active'); + } + + function closeAllModals() { + (document.querySelectorAll('.modal') || []).forEach(($modal) => { + closeModal($modal); + }); + } + + // Add a click event on buttons to open a specific modal + (document.querySelectorAll('.js-modal-trigger') || []).forEach(($trigger) => { + const modal = $trigger.dataset.target; + const $target = document.getElementById(modal); + $trigger.addEventListener('click', () => { + openModal($target); + }); + }); + + // Add a click event on various child elements to close the parent modal + (document.querySelectorAll( + '.modal-background, .modal-close, .modal-card-head .delete, .modal-card-foot .button') || []). + forEach(($close) => { + const $target = $close.closest('.modal'); + $close.addEventListener('click', () => { + closeModal($target); + }); + }); + + // Add a keyboard event to close all modals + document.addEventListener('keydown', (event) => { + const e = event || window.event; + if (e.keyCode === 27) { // Escape key + closeAllModals(); + } + }); + }); } diff --git a/javascripts/getmdl-select.min.js b/javascripts/getmdl-select.min.js deleted file mode 100644 index b333fd1..0000000 --- a/javascripts/getmdl-select.min.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";!function(){function e(){getmdlSelect.init(".getmdl-select")}window.addEventListener?window.addEventListener("load",e,!1):window.attachEvent&&window.attachEvent("onload",e)}();var getmdlSelect={_defaultValue:{width:300},_addEventListeners:function(e){var t=e.querySelector("input"),n=e.querySelectorAll("li"),l=e.querySelector(".mdl-js-menu");t.onkeydown=function(e){38!=e.keyCode&&40!=e.keyCode||l.MaterialMenu.show()}},init:function(e,t){var n=document.querySelectorAll(e);[].forEach.call(n,function(e){getmdlSelect._addEventListeners(e);var n=t;e.style.width=n+"px",componentHandler.upgradeElement(e),componentHandler.upgradeElement(e.querySelector("ul"))})}}; -//# sourceMappingURL=getmdl-select.min.js.map \ No newline at end of file diff --git a/online.html b/online.html deleted file mode 100644 index 355b9da..0000000 --- a/online.html +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/performance.html b/performance.html deleted file mode 100644 index 254773b..0000000 --- a/performance.html +++ /dev/null @@ -1,561 +0,0 @@ - - - - Performance - The Tensor Algebra Compiler (taco) - - - - - - - - - - - - - - - - - - - - - -
        -
        - -
        - -
        -
        -
        - - -
        -
        -

        Performance

        -
        - -
        - -
        -
        - -
        -

        rma10

        -
        - -
        - - - -
        -

        - "a(i) = B(i,j) * c(j)" -f=a:d -f=B:ds -f=c:d -

        -
        - -
        -
        - -
        - -
        -
        - -
        -

        cant

        -
        - -
        - - - -
        -

        - "a(i) = B(i,j) * c(j)" -f=a:d -f=B:ds -f=c:d -

        -
        - -
        -
        - -
        - -
        -
        - -
        -

        cop20k

        -
        - -
        - - - -
        -

        - "a(i) = B(i,j) * c(j)" -f=a:d -f=B:ds -f=c:d -

        -
        - -
        -
        - -
        - -
        -
        - -
        -

        scircuit

        -
        - -
        - - - -
        -

        - "a(i) = B(i,j) * c(j)" -f=a:d -f=B:ds -f=c:d -

        -
        - -
        -
        - -
        - -
        -
        - -
        -

        mac-econ

        -
        - -
        - - - -
        -

        - "a(i) = B(i,j) * c(j)" -f=a:d -f=B:ds -f=c:d -

        -
        - -
        -
        - -
        - -
        -
        - -
        -

        pwtk

        -
        - -
        - - - -
        -

        - "a(i) = B(i,j) * c(j)" -f=a:d -f=B:ds -f=c:d -

        -
        - -
        -
        - -
        - -
        -
        - -
        -

        nell-1

        -
        - -
        - - - -
        -

        - "A(i,j) = B(i,k,l) * C(k,j) * D(l,j)" -f=B:sss -

        -
        - -
        -
        - -
        - -
        -
        - -
        -

        nell-2

        -
        - -
        - - - -
        -

        - "A(i,j) = B(i,k,l) * C(k,j) * D(l,j)" -f=B:sss -

        -
        - -
        -
        - -
        - -
        -
        - -
        -

        facebook

        -
        - -
        - - - -
        -

        - "A(i,j) = B(i,k,l) * C(k,j) * D(l,j)" -f=B:sss -

        -
        - -
        -
        - -
        -
        -
        -
        - - -
        -
        - - diff --git a/publications.html b/publications.html deleted file mode 100644 index 3771c95..0000000 --- a/publications.html +++ /dev/null @@ -1,628 +0,0 @@ - - - - Publications - TACO: The Tensor Algebra Compiler - - - - - - - - - - - - - - - - - -
        -
        - -
        - -
        -
        -
        - -
        -
        -

        Publications

        -

        2020

        -
          -
        • -
          library_booksA Sparse Iteration Space Transformation Framework for Sparse Tensor Algebra  Ryan Senanayake, Changwan Hong, Ziheng Wang, Amalee Wilson, Stephen Chou, Shoaib Kamil, Saman Amarasinghe, and Fredrik Kjolstad
          -
          - - -
          Abstract
          -
          - We address the problem of optimizing sparse tensor algebra in a compiler and show how to define standard loop transformations---split, collapse, and reorder---on sparse iteration spaces. The key idea is to track the transformation functions that map the original iteration space to derived iteration spaces. These functions are needed by the code generator to emit code that maps coordinates between iteration spaces at runtime, since the coordinates in the sparse data structures remain in the original iteration space. We further demonstrate that derived iteration spaces can tile both the universe of coordinates and the subset of nonzero coordinates: the former is analogous to tiling dense iteration spaces, while the latter tiles sparse iteration spaces into statically load-balanced blocks of nonzeros. Tiling the space of nonzeros lets the generated code efficiently exploit heterogeneous compute resources such as threads, vector units, and GPUs. -

          We implement these concepts by extending the sparse iteration theory implementation in the TACO system. The associated scheduling API can be used by performance engineers or it can be the target of an automatic scheduling system. We outline one heuristic autoscheduling system, but other systems are possible. Using the scheduling API, we show how to optimize mixed sparse-dense tensor algebra expressions on CPUs and GPUs. Our results show that the sparse transformations are sufficient to generate code with competitive performance to hand-optimized implementations from the literature, while generalizing to all of the tensor algebra.
          -
          -
          BibTex
          -
          @article{senanayake:2020:scheduling,
          -  author = {Senanayake, Ryan and Hong, Changwan and Wang, Ziheng and Wilson, Amalee and Chou, Stephen and Kamil, Shoaib and Amarasinghe, Saman and Kjolstad, Fredrik},
          -  title = {A Sparse Iteration Space Transformation Framework for Sparse Tensor Algebra},
          -  year = {2020},
          -  issue_date = {November 2020},
          -  publisher = {Association for Computing Machinery},
          -  address = {New York, NY, USA},
          -  volume = {4},
          -  number = {OOPSLA},
          -  url = {https://doi.org/10.1145/3428226},
          -  doi = {10.1145/3428226},
          -  journal = {Proc. ACM Program. Lang.},
          -  month = nov,
          -  articleno = {158},
          -  numpages = {30},
          -  keywords = {Sparse Tensor Algebra, Sparse Iteration Spaces, Optimizing Transformations}
          -}
          -
          -
          -
          -
        • -
        • -
          library_booksAutomatic Generation of Efficient Sparse Tensor Format Conversion Routines  Stephen Chou, Fredrik Kjolstad, and Saman Amarasinghe
          -
          - -
          - -
          Abstract
          -
          -This paper shows how to generate code that efficiently converts sparse tensors between disparate storage formats (data layouts) such as CSR, DIA, ELL, and many others. We decompose sparse tensor conversion into three logical phases: coordinate remapping, analysis, and assembly. We then develop a language that precisely describes how different formats group together and order a tensor’s nonzeros in memory. This lets a compiler emit code that performs complex remappings of nonzeros when converting between formats. We also develop a query language that can extract statistics about sparse tensors, and we show how to emit efficient analysis code that computes such queries. Finally, we define an abstract interface that captures how data structures for storing a tensor can be efficiently assembled given specific statistics about the tensor. Disparate formats can implement this common interface, thus letting a compiler emit optimized sparse tensor conversion code for arbitrary combinations of many formats without hard-coding for any specific combination. -

          -Our evaluation shows that the technique generates sparse tensor conversion routines with performance between 1.00 and 2.01× that of hand-optimized versions in SPARSKIT and Intel MKL, two popular sparse linear algebra libraries. And by emitting code that avoids materializing temporaries, which both libraries need for many combinations of source and target formats, our technique outperforms those libraries by 1.78 to 4.01× for CSC/COO to DIA/ELL conversion.
          -
          -
          BibTex
          -
          @inproceedings{chou:2020:conversion,
          -  author = {Chou, Stephen and Kjolstad, Fredrik and Amarasinghe, Saman},
          -  title = {Automatic Generation of Efficient Sparse Tensor Format Conversion Routines},
          -  year = {2020},
          -  isbn = {9781450376136},
          -  publisher = {Association for Computing Machinery},
          -  address = {New York, NY, USA},
          -  url = {https://doi.org/10.1145/3385412.3385963},
          -  doi = {10.1145/3385412.3385963},
          -  booktitle = {Proceedings of the 41st ACM SIGPLAN Conference on Programming Language Design and Implementation},
          -  pages = {823–838},
          -  numpages = {16},
          -  keywords = {coordinate remapping notation, attribute query language, sparse tensor formats, sparse tensor conversion, sparse tensor assembly, sparse tensor algebra},
          -  location = {London, UK},
          -  series = {PLDI 2020}
          -}
          -
          - -
          -
        • -
        • -
          library_booksSparse Tensor Transpositions -  Suzanne Mueller, Peter Ahrens, Stephen Chou, Fredrik Kjolstad, and Saman Amarasinghe
          -
          - -
          - -
          Abstract
          -
          -We present a new algorithm for transposing sparse tensors called Quesadilla. The algorithm converts the sparse tensor data structure to a list of coordinates and sorts it with a fast multi-pass radix algorithm that exploits knowledge of the requested transposition and the tensors input partial coordinate ordering to provably minimize the number of parallel partial sorting passes. We evaluate both a serial and a parallel implementation of Quesadilla on a set of 19 tensors from the FROSTT collection, a set of tensors taken from scientific and data analytic applications. We compare Quesadilla and a generalization, Top-2-sadilla to several state of the art approaches, including the tensor transposition routine used in the SPLATT tensor factorization library. In serial tests, Quesadilla was the best strategy for 60% of all tensor and transposition combinations and improved over SPLATT by at least 19% in half of the combinations. In parallel tests, at least one of Quesadilla or Top-2-sadilla was the best strategy for 52% of all tensor and transposition combinations. -
          -
          -
          BibTex
          -
          @inproceedings{10.1145/3350755.3400245,
          -  author = {Mueller, Suzanne and Ahrens, Peter and Chou, Stephen and Kjolstad, Fredrik and Amarasinghe, Saman},
          -  title = {Sparse Tensor Transpositions},
          -  year = {2020},
          -  isbn = {9781450369350},
          -  publisher = {Association for Computing Machinery},
          -  address = {New York, NY, USA},
          -  url = {https://doi.org/10.1145/3350755.3400245},
          -  doi = {10.1145/3350755.3400245},
          -  booktitle = {Proceedings of the 32nd ACM Symposium on Parallelism in Algorithms and Architectures},
          -  pages = {559–561},
          -  numpages = {3},
          -  keywords = {COO, sorting, radix sort, transposition, sparse tensors},
          -  location = {Virtual Event, USA},
          -  series = {SPAA '20}
          -}
          -
          - -
          -
        • -
        • -
          library_booksA Framework for Computing on Sparse Tensors based on Operator Properties  Rawn Henry
          -
          - -
          - -
          Abstract
          -
          -Tensor operations have been traditionally limited to addition and multiplication operations. For operations of sparse tensors, these semantics were extended to account for the fact that tensors usually omit zero values. However, there are many operators with a rich semantics of operator properties that can be used in dense and sparse tensor computations. -

          This work addresses the problem of generating code for computing on a mix of sparseand dense tensors based on the properties of the operators on those tensors. I introduce the concept of a fill value to each tensor so that the data can be sparse on non-zeros. I show how to reason about the operator properties, along with the fillvalues of the input tensors in order to construct an IR describing how to iterate overthese tensors. I show how we can take advantage of the operator properties to perform useful optimizations for both iterating over tensors and performing reductions. Lastly, I show how a user can leverage set notation to directly describe to a compiler how it should iterate over sparse tensors. -

          The ideas discussed in this work have been prototyped in the open-source TACOsystem. The API used makes operator properties and tensor fill values have to beexplicitly provided by the user. However, it makes the TACO system much more flexible. I show how the primitives exposed in this work allows one to efficiently performseveral graph algorithms by drawing on the literature about GraphBLAS. In the evaluation section, we benchmark this system against the SuiteSparse implementation ofGraphBLAS on a variety of graph algorithms to demonstrate its performance.
          -
          -
          BibTex
          -
          @MastersThesis{henry:2020:thesis,
          -  title = "A Framework for Computing on Sparse Tensors based on Operator Properties",
          -  author = "Rawn Henry",
          -  month = "May",
          -  year = "2020",
          -  url = "http://groups.csail.mit.edu/commit/papers/2020/rawn_2020.pdf",
          -  type = "M.Eng. Thesis",
          -  address = "Cambridge, MA",
          -  school = "Massachusetts Institute of Technology",
          -}
          -
          - -
          -
        • -
        • -
          library_booksAutomatic Optimization of Sparse Tensor Algebra Programs  Ziheng Wang
          -
          - -
          - -
          Abstract
          -
          -In this thesis, I attempt to give some guidance on how to automatically optimize programs using a domain-specific-language (DSLs) compiler that exposes a set of scheduling commands. These DSLs have proliferated as of late, including Halide, TACO, Tiramisu and TVM, to name a few. The scheduling commands allow succinct expression of the programmer’s desire to perform certain loop transformations,such as strip-mining, tiling, collapsing and parallelization, which the compiler proceeds to carry out. I explore if we can automatically generate schedules with good performance. -
          The main difficulty in searching for good schedules is the astronomical number of valid schedules for a particular program. I describe a system which generates a list of candidate schedules through a set of modular stages. Different optimization decisions are made at each stage, to trim down the number of schedules considered. I argue that certain sequences of scheduling commands are equivalent in their effect in partitioning the iteration space, and introduce heuristics that limit the number of permutations of variables. I implement these ideas for the open-source TACO system. I demonstrate several orders of magnitude reduction in the effective schedule search space. I also show that for most of the problems considered, we can generate schedules better than or equal to hand-tuned schedules in terms of performance.
          -
          -
          BibTex
          -
          @MastersThesis{wang:2020:thesis,
          -  title = "Automatic Optimization of Sparse Tensor Algebra Programs",
          -  author = "Ziheng Wang",
          -  month = "May",
          -  year = "2020",
          -  url = "http://groups.csail.mit.edu/commit/papers/2020/tony_2020.pdf",
          -  type = "M.Eng. Thesis",
          -  address = "Cambridge, MA",
          -  school = "Massachusetts Institute of Technology",
          -}
          -
          - -
          -
        • -
        • -
          library_booksA Unified Iteration Space Transformation Framework for Sparse and Dense Tensor Algebra  Ryan Senanayake
          -
          - -
          - -
          Abstract
          -
          -This work addresses the problem of optimizing mixed sparse and dense tensor algebra in a compiler. I show that standard loop transformations, such as strip-mining, tiling, collapsing, parallelization and vectorization, can be applied to irregular loops over sparse iteration spaces. I also show how these transformations can be applied to the contiguous value arrays of sparse tensor data structures, which I call their position spaces, to unlock load-balanced tiling and parallelism. -
          These concepts have been prototyped in the open-source TACO system, where they are exposed as a scheduling API similar to the Halide domain-specific language for dense computations. Using this scheduling API, I show how to optimize mixed sparse/dense tensor algebra expressions, how to generate load-balanced code by scheduling sparse tensor algebra in position space, and how to generate sparse tensor algebra GPU code. As shown in the evaluation, these transformations allow us to generate code that is competitive with many hand-optimized implementations from the literature.
          -
          -
          BibTex
          -
          @MastersThesis{senanayake:2020:thesis,
          -  title = "A Unified Iteration Space Transformation Framework for Sparse and Dense Tensor Algebra",
          -  author = "Ryan Senanayake",
          -  month = "Feb",
          -  year = "2020",
          -  url = "http://groups.csail.mit.edu/commit/papers/2020/ryan_2020.pdf",
          -  type = "M.Eng. Thesis",
          -  address = "Cambridge, MA",
          -  school = "Massachusetts Institute of Technology",
          -}
          -
          - -
          -
        • -
        • -
          library_booksSparse Tensor Transpositions in the Tensor Algebra Compiler  Suzanne Mueller
          -
          - -
          - -
          Abstract
          -
          -The current state of the art for transposing sparse tensors involves converting the sparse tensor into a list of coordinates, sorting the list of coordinates and finally packing the list of coordinates into the desired sparse tensor format. This thesis explores the potential for faster methodologies. Its main contributions are an algorithm that exploits partial sortedness to minimize sorting passes and an implementation that demonstrates that this transposition algorithm is competitive with state of the art. In particular the algorithm takes advantage of the ordering that already exists to apply selective sorting passes and thereby reduce the amount of work that needsto be done to reorder the tensor.
          -
          -
          BibTex
          -
          @MastersThesis{mueller:2020:thesis,
          -  title = "Sparse Tensor Transpositions in the Tensor Algebra Compiler",
          -  author = "Suzanne Mueller",
          -  month = "Feb",
          -  year = "2020",
          -  url = "http://groups.csail.mit.edu/commit/papers/2020/suzanne_2020.pdf",
          -  type = "M.Eng. Thesis",
          -  address = "Cambridge, MA",
          -  school = "Massachusetts Institute of Technology",
          -}
          -
          - -
          -
        • -
        • -
          library_booksSparse Tensor Algebra Compilation  Fredrik Kjolstad
          -
          - -
          - -
          Abstract
          -
          -This dissertation shows how to compile any sparse tensor algebra expression to CPU and GPU code that matches the performance of hand-optimized implementations. A tensor algebra expression is sparse if at least one of its tensor operands is sparse, and a tensor is sparse if most of its values are zero. If a tensor is sparse, then we can store its nonzero values in a compressed data structure, and omit the zeros. Indeed, as the matrices and tensors in many important applications are extremely sparse, compressed data structures provide the only practical means to store them. A sparse tensor algebra expression may contain any number of operations, which must be compiled to fused sparse loops that compute the entire expression simultaneously. It is not viable to support only binary expressions, because their composition may result in worse asymptotic complexity than the fused implementation. I present compiler techniques to generate fused loops that coiterate over any number of tensors stored in different types of data structures. By design, these loops avoid computing values known to be zero due to the algebraic properties of their operators. -
          Sparse tensor algebra compilation is made possible by a sparse iteration theory that formulates sparse iteration spaces as set expressions of the coordinates of nonzero values. By ordering iteration space dimensions hierarchically, the compiler recursively generates loops that coiterate over tensor data structures one dimension at a time. By organizing per-dimension coiteration into regions based on algebraic operator properties, it removes operations that will result in zero. And by transforming the sparse iteration spaces, it optimizes the generated code. The result is the first sparse iteration compiler, called the Tensor Algebra Compiler (taco). Taco can compile any tensor algebra expressions, with tensors stored in different types of sparse and dense data structures, to code that matches the performance of hand-optimized implementations on CPUs and GPUs.
          -
          -
          BibTex
          -
          @PhDThesis{kjolstad:2020:thesis,
          -  title = "Sparse Tensor Algebra Compilation",
          -  author = "Fredrik Kjolstad",
          -  month = "Feb",
          -  year = "2020",
          -  url = "http://groups.csail.mit.edu/commit/papers/2020/kjolstad-thesis.pdf",
          -  type = "Ph.D. Thesis",
          -  address = "Cambridge, MA",
          -  school = "Massachusetts Institute of Technology",
          -}
          -
          - -
          -
        • -
        - -

        2019

        -
          -
        • -
          library_booksA Tensor Algebra Compiler Library Interface and Runtime  Patricio Noyola
          -
          - -
          - -
          Abstract
          -
          -Tensor algebra is a powerful tool for computing on multidimensional data and has applications in many fields. The number of possible tensor operations is infinite, so it is impossible to manually implement all of them to operate on different tensor dimensions. The Tensor Algebra Compiler (taco) introduced a compiler approach to automatically generate kernels for any compound tensor algebra operation on any input tensor formats. -

          In this thesis, we present a new API for the taco library. The API removes the need to call compiler methods with the introduction of a delayed execution framework. Additionally, the API introduces multiple important tensor algebra features previously unavailable in taco. Finally, we propose extensions to taco’s code generation algorithm to automatically generate tensor API methods for any tensor format. -

          The proposed API makes taco code cleaner, shorter and more elegant. Furthermore, the extensions to its code generation algorithm make the API scalable to new formats and operations.
          -
          -
          BibTex
          -
          @MastersThesis{noyola:2019:thesis,
          -  title = "A Tensor Algebra Compiler Library Interface and Runtime",
          -  author = "Patricio Noyola",
          -  month = "May",
          -  year = "2019",
          -  url = "http://groups.csail.mit.edu/commit/papers/2019/Patricio_thesis.pdf",
          -  type = "M.Eng. Thesis",
          -  address = "Cambridge, MA",
          -  school = "Massachusetts Institute of Technology",
          -}
          -
          - -
          -
        • -
        • -
          library_booksSuperTaco: Taco Tensor Algebra Kernels on Distributed Systems Using Legion  Sachin Dilip Shinde
          -
          - -
          - -
          Abstract
          -
          -Tensor algebra is a powerful language for expressing computation on multidimensional data. While many tensor datasets are sparse, most tensor algebra libraries have limited support for handling sparsity. The Tensor Algebra Compiler (Taco) has introduced a taxonomy for sparse tensor formats that has allowed them to compile sparse tensor algebra expressions to performant C code, but they have not taken advantage of distributed systems. -

          This work provides a code generation technique for creating Legion programs that distribute the computation of Taco tensor algebra kernels across distributed systems, and a scheduling language for controlling how this distributed computation is structured. This technique is implemented in the form of a command-line tool called SuperTaco. We perform a strong scaling analysis for the SpMV and TTM kernels under a row blocking distribution schedule, and find speedups of 9-10x when using 20 cores on a single node. For multi-node systems using 20 cores per node, SpMV achieves a 33.3x speedup at 160 cores and TTM achieves a 42.0x speedup at 140 cores.
          -
          -
          BibTex
          -
          @MastersThesis{shinde:2019:thesis,
          -  title = "SuperTaco: Taco Tensor Algebra Kernels on Distributed Systems Using Legion",
          -  author = "Sachin Dilip Shinde",
          -  month = "Feb",
          -  year = "2019",
          -  url = "http://groups.csail.mit.edu/commit/papers/2019/thesis-shinde.pdf",
          -  type = "M.Eng. Thesis",
          -  address = "Cambridge, MA",
          -  school = "Massachusetts Institute of Technology",
          -}
          -
          - -
          -
        • -
        • -
          library_booksTensor Algebra Compilation with Workspaces  Fredrik Kjolstad, Peter Ahrens, Shoaib Kamil, and Saman Amarasinghe
          -
          - -
          - -
          Abstract
          -
          -This paper shows how to extend sparse tensor algebra compilers to introduce -temporary tensors called workspaces to avoid inefficient sparse data structures -accesses. We develop an intermediate representation (IR) for tensor operations -called concrete index notation that specifies when sub-computations occur and -where they are stored. We then describe the workspace transformation in this -IR, how to programmatically invoke it, and how the IR is compiled to sparse -code. Finally, we show how the transformation can be used to optimize sparse -tensor kernels, including sparse matrix multiplication, sparse tensor addition, -and the matricized tensor times Khatri-Rao product (MTTKRP). -

          -Our results show that the workspace transformation brings the performance of -these kernels on par with hand-optimized implementations. For example, we -improve the performance of MTTKRP with dense output by up to 35\%, and enable -generating sparse matrix multiplication and MTTKRP with sparse output, neither -of which were supported by prior tensor algebra compilers. -This paper shows how to optimize sparse tensor algebraic expressions by -introducing temporary tensors, called workspaces, into the resulting loop -nests. We develop a new intermediate language for tensor operations called -concrete index notation that extends tensor index notation. Concrete index -notation expresses when and where sub-computations occur and what tensor they -are stored into. We then describe the workspace optimization in this language, -and how to compile it to sparse code by building on prior work in the -literature.
          -
          -
          BibTex
          -
          @article{kjolstad:2018:workspaces,
          - author = {Kjolstad, Fredrik and Ahrens, Peter and Kamil, Shoaib and Amarasinghe, Saman},
          - title = {Tensor Algebra Compilation with Workspaces},
          - booktitle = {Proceedings of the 2019 IEEE/ACM International Symposium on Code Generation and Optimization},
          - series = {CGO 2019},
          - year = {2019},
          - isbn = {978-1-7281-1436-1},
          - location = {Washington, DC, USA},
          - pages = {180--192},
          - numpages = {13},
          - url = {http://dl.acm.org/citation.cfm?id=3314872.3314894},
          - acmid = {3314894},
          - publisher = {IEEE Press},
          - address = {Piscataway, NJ, USA},
          - keywords = {code optimization, concrete index notation, sparse tensor algebra, temporaries, workspaces},
          -}
          -
          - -
          -
        • -
        - -

        2018

        -
          -
        • -
          library_booksFormat Abstraction for Sparse Tensor Algebra Compilers  Stephen Chou, Fredrik Kjolstad, and Saman Amarasinghe
          -
          - -
          - -
          Abstract
          -
          - This paper shows how to build a sparse tensor algebra compiler that is - agnostic to tensor formats (data layouts). We develop an interface that - describes formats in terms of their capabilities and properties, and show how - to build a modular code generator where new formats can be added as plugins. - We then describe six implementations of the interface that compose to form - the dense, CSR/CSF, COO, DIA, ELL, and HASH tensor formats and countless - variants thereof. With these implementations at hand, our code generator can - generate code to compute any tensor algebra expression on any combination of - the aforementioned formats. -

          - To demonstrate our technique, we have implemented it in the taco tensor - algebra compiler. Our modular code generator design makes it simple to add - support for new tensor formats, and the performance of the generated code is - competitive with hand-optimized implementations. Furthermore, by - extending taco to support a wider range of formats specialized for - different application and data characteristics, we can improve end-user - application performance. For example, if input data is provided in the COO - format, our technique allows computing a single matrix-vector multiplication - directly with the data in COO, which is up to 3.6× faster than by - first converting the data to CSR.
          -
          -
          BibTex
          -
          @article{chou:2018:formats,
          - author = {Chou, Stephen and Kjolstad, Fredrik and Amarasinghe, Saman},
          - title = {Format Abstraction for Sparse Tensor Algebra Compilers},
          - journal = {Proc. ACM Program. Lang.},
          - issue_date = {November 2018},
          - volume = {2},
          - number = {OOPSLA},
          - month = oct,
          - year = {2018},
          - issn = {2475-1421},
          - pages = {123:1--123:30},
          - articleno = {123},
          - numpages = {30},
          - url = {http://doi.acm.org/10.1145/3276493},
          - doi = {10.1145/3276493},
          - acmid = {3276493},
          - publisher = {ACM},
          - address = {New York, NY, USA},
          - keywords = {modular code generation, sparse tensor algebra compilation, tensor formats},
          -}
          -
          - -
          -
        • -
        • -
          library_booksUnified Sparse Formats for Tensor Algebra Compilers  Stephen Chou
          -
          - -
          - -
          Abstract
          -
          -Tensor algebra is a powerful tool for computing on multidimensional data and has appli-cations in many fields. Practical applications often deal with tensors that are sparse, and there exists a wide variety of formats for storing such tensors, each suited to specific typesof applications and data. Examples of sparse tensor storage formats include COO, CSR, CSC, DCSR, BCSR, CSF, CSB, ELL, DIA, and hash maps. -

          In this thesis, we propose a levelized hierarchical abstraction that represents these seemingly disparate formats and countless others, and that hides the details of each format behind a common interface. We show that this tensor representation facilitates automatic generation of efficient compute kernels for tensor algebra expressions with any combination of formats. This is accomplished with a code generation algorithm that generates code level by level, guided by the capabilities and properties of the levels. -

          The performance of tensor algebra kernels generated using our technique is competitive with that of equivalent hand-implemented kernels in existing sparse linear and tensor algebra libraries. Furthermore, our technique can generate many more kernels for many more formats than exist in libraries or are supported by existing compiler techniques.
          -
          -
          BibTex
          -
          @ScienceThesis{chou:sm-thesis:2018,
          -  title = "Unified Sparse Formats for Tensor Algebra Compilers",
          -  author = "Stephen Chou",
          -  month = "Feb",
          -  year = "2018",
          -  url = "http://groups.csail.mit.edu/commit/papers/2018/chou-18-sm-thesis.pdf",
          -  type = "S.M. Thesis",
          -  address = "Cambridge, MA",
          -  school = "Massachusetts Institute of Technology",
          -}
          -
          - -
          -
        • -
        - -

        2017

        -
          -
        • -
          library_booksThe Tensor Algebra Compiler  Fredrik Kjolstad, Shoaib Kamil, Stephen Chou, David Lugato, and Saman Amarasinghe
          -
          - - -
          Abstract
          -
          - Tensor algebra is a powerful tool with applications in machine learning, data - analytics, engineering and the physical sciences. Tensors are often sparse - and compound operations must frequently be computed in a single kernel for - performance and to save memory. Programmers are left to write kernels for - every operation of interest, with different mixes of dense and sparse tensors - in different formats. The combinations are infinite, which makes it - impossible to manually implement and optimize them all. This paper - introduces the first compiler technique to automatically generate kernels for - any compound tensor algebra operation on dense and sparse tensors. The - technique is implemented in a C++ library called taco. Its performance is - competitive with best-in-class hand-optimized kernels in popular libraries, - while supporting far more tensor operations.
          -
          -
          BibTex
          -
          @article{kjolstad:2017:taco,
          - author = {Kjolstad, Fredrik and Kamil, Shoaib and Chou, Stephen and Lugato, David and Amarasinghe, Saman},
          - title = {The Tensor Algebra Compiler},
          - journal = {Proc. ACM Program. Lang.},
          - issue_date = {October 2017},
          - volume = {1},
          - number = {OOPSLA},
          - month = oct,
          - year = {2017},
          - issn = {2475-1421},
          - pages = {77:1--77:29},
          - articleno = {77},
          - numpages = {29},
          - url = {http://doi.acm.org/10.1145/3133901},
          - doi = {10.1145/3133901},
          - acmid = {3133901},
          - publisher = {ACM},
          - address = {New York, NY, USA},
          - keywords = {code generation, iteration graphs, linear algebra, merge lattices, parallelism, performance, sparse data structures, tensor algebra, tensors}
          -}
          -
          -
          -
          -
        • -
        • -
          library_bookstaco: A Tool to Generate Tensor Algebra Kernels  Fredrik Kjolstad, Stephen Chou, David Lugato, Shoaib Kamil, and Saman Amarasinghe
          -
          - -
          - -
          Abstract
          -
          - Tensor algebra is an important computational abstraction that is increasingly - used in data analytics, machine learning, engineering, and the physical - sciences. However, the number of tensor expressions is unbounded, which makes - it hard to develop and optimize libraries. Furthermore, the tensors are often - sparse (most components are zero), which means the code has to traverse - compressed formats. To support programmers we have developed taco, a code - generation tool that generates dense, sparse, and mixed kernels from tensor - algebra expressions. This paper describes the taco web and command-line tools - and discusses the benefits of a code generator over a traditional library. - See also the demo video at tensor-compiler.org/ase2017.
          -
          -
          BibTex
          -
          @inproceedings{kjolstad:2017:tacotool, 
          -  author={Kjolstad, Fredrik and Chou, Stephen and Lugato, David and Kamil, Shoaib and Amarasinghe, Saman}, 
          -  booktitle={2017 32nd IEEE/ACM International Conference on Automated Software Engineering (ASE)}, 
          -  title={taco: A Tool to Generate Tensor Algebra Kernels}, 
          -  year={2017}, 
          -  pages={943-948}, 
          -  keywords={data analysis;learning (artificial intelligence);mathematics computing;program compilers;software libraries;tensors;code generation tool;code generator;command-line tools;compressed formats;computational abstraction;data analytics;dense kernels;machine learning;mixed kernels;physical sciences;sparse kernels;taco web;tensor algebra expressions;tensor algebra kernels;tensor expressions;Indexes;Kernel;Libraries;Linear algebra;Tensile stress;Tools;Tensor algebra;compiler;linear algebra;sparse}, 
          -  doi={10.1109/ASE.2017.8115709}, 
          -  month={Oct}
          -}
          -
          - -
          -
        • -
        - -

        2016

        -
          -
        • -
          library_booksAn Investigation of Sparse Tensor Formats for Tensor Libraries  Parker Allen Tew
          -
          - -
          - -
          Abstract
          -
          -Tensors provide a generalized structure to store arbitrary indexable data, which is applicable in fields such as chemometrics, physics simulations, signal processing and lies at the heart of machine learning. Many naturally occurring tensors are considered sparse as they contain mostly zero values. As with sparse matrices, various techniques can be employed to more efficiently store and compute on these sparse tensors. -

          This work explores several sparse tensor formats while ultimately evaluating two implementations; one based on explicitly storing coordinates and one that compresses these coordinates. The two formats, Coordinate and CSF2, were evaluated by comparing their execution time of tensor-matrix products and the MTTKRP operation on several datasets. We find that the Coordinate format is superior for uniformly distributed sparse tensors or when used in computation that emits a sparse tensor via a mode dependent operation. In all other considered cases for large sparse tensors, the storage savings of the compressed format provide the best results.
          -
          -
          BibTex
          -
          @MastersThesis{parker:meng-thesis:2016,
          -  title = "An Investigation of Sparse Tensor Formats for Tensor Libraries",
          -  author = "Parker Allen Tew",
          -  month = "Jun",
          -  year = "2016",
          -  url = "http://groups.csail.mit.edu/commit/papers/2016/parker-thesis.pdf",
          -  type = "M.Eng. Thesis",
          -  address = "Cambridge, MA",
          -  school = "Massachusetts Institute of Technology",
          -}
          -
          - -
          -
        • -
        -
        -
        -
        -
        -
        - - -
        -
        - -
        - - diff --git a/publications.md b/publications.md new file mode 100644 index 0000000..afe1f70 --- /dev/null +++ b/publications.md @@ -0,0 +1,12 @@ +--- +title: Publications +hero_height: is-small +layout: page +--- + +TACO is built on research that is described in the following publications, which include conference papers and preprints (denoted by ) as well as master's and PhD theses (denoted by ). +Simply click on the title of any paper or thesis below to see more information, download a copy, or watch the accompanying talk. + +(*) denotes co-first authors. + +{% include publist.html pubs="publications" %} diff --git a/related.md b/related.md new file mode 100644 index 0000000..e4f6244 --- /dev/null +++ b/related.md @@ -0,0 +1,11 @@ +--- +title: Related Projects +hero_height: is-small +layout: page +--- + +Below are some examples of other projects that are also built on top of TACO's sparse tensor algebra compiler theory. + +If you have a project that you'd like added to this list as well, please reach out to us (or consider submitting a pull request to [update the website yourself](https://github.com/tensor-compiler/tensor-compiler.github.io))! + +{% include publist.html pubs="related" %} diff --git a/stylesheets/bootstrap-dropdown.css b/stylesheets/bootstrap-dropdown.css deleted file mode 100644 index 7302bef..0000000 --- a/stylesheets/bootstrap-dropdown.css +++ /dev/null @@ -1,8 +0,0 @@ -/*! - * Bootstrap v3.4.1 (https://getbootstrap.com/) - * Copyright 2011-2019 Twitter, Inc. - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - *//*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */ - -.dropdown-toggle.btn-default{color:#333;background-color:#e6e6e6;background-image:none;border-color:#adadad}.btn-default.active.focus,.btn-default.active:focus,.btn-default.active:hover,.btn-default:active.focus,.btn-default:active:focus,.btn-default:active:hover,.open>.dropdown-toggle.btn-default.focus,.open>.dropdown-toggle.btn-default:focus,.open>.dropdown-toggle.btn-default:hover{color:#333;background-color:#d4d4d4;border-color:#8c8c8c}.btn-default.disabled.focus,.btn-default.disabled:focus,.btn-default.disabled:hover,.btn-default[disabled].focus,.btn-default[disabled]:focus,.btn-default[disabled]:hover,fieldset[disabled] .btn-default.focus,fieldset[disabled] .btn-default:focus,fieldset[disabled] .btn-default:hover{background-color:#fff;border-color:#ccc}.btn-default .badge{color:#fff;background-color:#333}.btn-primary{color:#fff;background-color:#337ab7;border-color:#2e6da4}.btn-primary.focus,.btn-primary:focus{color:#fff;background-color:#286090;border-color:#122b40}.btn-primary:hover{color:#fff;background-color:#286090;border-color:#204d74}.btn-primary.active,.btn-primary:active,.open>.dropdown-toggle.btn-primary{color:#fff;background-color:#286090;background-image:none;border-color:#204d74}.btn-primary.active.focus,.btn-primary.active:focus,.btn-primary.active:hover,.btn-primary:active.focus,.btn-primary:active:focus,.btn-primary:active:hover,.open>.dropdown-toggle.btn-primary.focus,.open>.dropdown-toggle.btn-primary:focus,.open>.dropdown-toggle.btn-primary:hover{color:#fff;background-color:#204d74;border-color:#122b40}.btn-primary.disabled.focus,.btn-primary.disabled:focus,.btn-primary.disabled:hover,.btn-primary[disabled].focus,.btn-primary[disabled]:focus,.btn-primary[disabled]:hover,fieldset[disabled] .btn-primary.focus,fieldset[disabled] .btn-primary:focus,fieldset[disabled] .btn-primary:hover{background-color:#337ab7;border-color:#2e6da4}.btn-primary .badge{color:#337ab7;background-color:#fff}.btn-success{color:#fff;background-color:#5cb85c;border-color:#4cae4c}.btn-success.focus,.btn-success:focus{color:#fff;background-color:#449d44;border-color:#255625}.btn-success:hover{color:#fff;background-color:#449d44;border-color:#398439}.btn-success.active,.btn-success:active,.open>.dropdown-toggle.btn-success{color:#fff;background-color:#449d44;background-image:none;border-color:#398439}.btn-success.active.focus,.btn-success.active:focus,.btn-success.active:hover,.btn-success:active.focus,.btn-success:active:focus,.btn-success:active:hover,.open>.dropdown-toggle.btn-success.focus,.open>.dropdown-toggle.btn-success:focus,.open>.dropdown-toggle.btn-success:hover{color:#fff;background-color:#398439;border-color:#255625}.btn-success.disabled.focus,.btn-success.disabled:focus,.btn-success.disabled:hover,.btn-success[disabled].focus,.btn-success[disabled]:focus,.btn-success[disabled]:hover,fieldset[disabled] .btn-success.focus,fieldset[disabled] .btn-success:focus,fieldset[disabled] .btn-success:hover{background-color:#5cb85c;border-color:#4cae4c}.btn-success .badge{color:#5cb85c;background-color:#fff}.btn-info{color:#fff;background-color:#5bc0de;border-color:#46b8da}.btn-info.focus,.btn-info:focus{color:#fff;background-color:#31b0d5;border-color:#1b6d85}.btn-info:hover{color:#fff;background-color:#31b0d5;border-color:#269abc}.btn-info.active,.btn-info:active,.open>.dropdown-toggle.btn-info{color:#fff;background-color:#31b0d5;background-image:none;border-color:#269abc}.btn-info.active.focus,.btn-info.active:focus,.btn-info.active:hover,.btn-info:active.focus,.btn-info:active:focus,.btn-info:active:hover,.open>.dropdown-toggle.btn-info.focus,.open>.dropdown-toggle.btn-info:focus,.open>.dropdown-toggle.btn-info:hover{color:#fff;background-color:#269abc;border-color:#1b6d85}.btn-info.disabled.focus,.btn-info.disabled:focus,.btn-info.disabled:hover,.btn-info[disabled].focus,.btn-info[disabled]:focus,.btn-info[disabled]:hover,fieldset[disabled] .btn-info.focus,fieldset[disabled] .btn-info:focus,fieldset[disabled] .btn-info:hover{background-color:#5bc0de;border-color:#46b8da}.btn-info .badge{color:#5bc0de;background-color:#fff}.btn-warning{color:#fff;background-color:#f0ad4e;border-color:#eea236}.btn-warning.focus,.btn-warning:focus{color:#fff;background-color:#ec971f;border-color:#985f0d}.btn-warning:hover{color:#fff;background-color:#ec971f;border-color:#d58512}.btn-warning.active,.btn-warning:active,.open>.dropdown-toggle.btn-warning{color:#fff;background-color:#ec971f;background-image:none;border-color:#d58512}.btn-warning.active.focus,.btn-warning.active:focus,.btn-warning.active:hover,.btn-warning:active.focus,.btn-warning:active:focus,.btn-warning:active:hover,.open>.dropdown-toggle.btn-warning.focus,.open>.dropdown-toggle.btn-warning:focus,.open>.dropdown-toggle.btn-warning:hover{color:#fff;background-color:#d58512;border-color:#985f0d}.btn-warning.disabled.focus,.btn-warning.disabled:focus,.btn-warning.disabled:hover,.btn-warning[disabled].focus,.btn-warning[disabled]:focus,.btn-warning[disabled]:hover,fieldset[disabled] .btn-warning.focus,fieldset[disabled] .btn-warning:focus,fieldset[disabled] .btn-warning:hover{background-color:#f0ad4e;border-color:#eea236}.btn-warning .badge{color:#f0ad4e;background-color:#fff}.btn-danger{color:#fff;background-color:#d9534f;border-color:#d43f3a}.btn-danger.focus,.btn-danger:focus{color:#fff;background-color:#c9302c;border-color:#761c19}.btn-danger:hover{color:#fff;background-color:#c9302c;border-color:#ac2925}.btn-danger.active,.btn-danger:active,.open>.dropdown-toggle.btn-danger{color:#fff;background-color:#c9302c;background-image:none;border-color:#ac2925}.btn-danger.active.focus,.btn-danger.active:focus,.btn-danger.active:hover,.btn-danger:active.focus,.btn-danger:active:focus,.btn-danger:active:hover,.open>.dropdown-toggle.btn-danger.focus,.open>.dropdown-toggle.btn-danger:focus,.open>.dropdown-toggle.btn-danger:hover{color:#fff;background-color:#ac2925;border-color:#761c19}.btn-danger.disabled.focus,.btn-danger.disabled:focus,.btn-danger.disabled:hover,.btn-danger[disabled].focus,.btn-danger[disabled]:focus,.btn-danger[disabled]:hover,fieldset[disabled] .btn-danger.focus,fieldset[disabled] .btn-danger:focus,fieldset[disabled] .btn-danger:hover{background-color:#d9534f;border-color:#d43f3a}.btn-danger .badge{color:#d9534f;background-color:#fff}.btn-link{font-weight:400;color:#337ab7;border-radius:0}.btn-link,.btn-link.active,.btn-link:active,.btn-link[disabled],fieldset[disabled] .btn-link{background-color:transparent;-webkit-box-shadow:none;box-shadow:none}.btn-link,.btn-link:active,.btn-link:focus,.btn-link:hover{border-color:transparent}.btn-link:focus,.btn-link:hover{color:#23527c;text-decoration:underline;background-color:transparent}.btn-link[disabled]:focus,.btn-link[disabled]:hover,fieldset[disabled] .btn-link:focus,fieldset[disabled] .btn-link:hover{color:#777;text-decoration:none}.btn-group-lg>.btn,.btn-lg{padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}.btn-group-sm>.btn,.btn-sm{padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}.btn-group-xs>.btn,.btn-xs{padding:1px 5px;font-size:12px;line-height:1.5;border-radius:3px}.btn-block{display:block;width:100%}.btn-block+.btn-block{margin-top:5px}input[type=button].btn-block,input[type=reset].btn-block,input[type=submit].btn-block{width:100%}.fade{opacity:0;-webkit-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{display:none}.collapse.in{display:block}tr.collapse.in{display:table-row}tbody.collapse.in{display:table-row-group}.collapsing{position:relative;height:0;overflow:hidden;-webkit-transition-property:height,visibility;-o-transition-property:height,visibility;transition-property:height,visibility;-webkit-transition-duration:.35s;-o-transition-duration:.35s;transition-duration:.35s;-webkit-transition-timing-function:ease;-o-transition-timing-function:ease;transition-timing-function:ease}.caret{display:inline-block;width:0;height:0;margin-left:2px;vertical-align:middle;border-top:4px dashed;border-top:4px solid\9;border-right:4px solid transparent;border-left:4px solid transparent}.dropdown,.dropup{position:relative}.dropdown-toggle:focus{outline:0}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;font-size:14px;text-align:left;list-style:none;background-color:#fff;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0,0,0,.15);border-radius:4px;-webkit-box-shadow:0 6px 12px rgba(0,0,0,.175);box-shadow:0 6px 12px rgba(0,0,0,.175)}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:9px 0;overflow:hidden;background-color:#e5e5e5}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:400;line-height:1.42857143;color:#333;white-space:nowrap}.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover{color:#262626;text-decoration:none;background-color:#f5f5f5}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover{color:#fff;text-decoration:none;background-color:#337ab7;outline:0}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{color:#777}.dropdown-menu>.disabled>a:focus,.dropdown-menu>.disabled>a:hover{text-decoration:none;cursor:not-allowed;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open>.dropdown-menu{display:block}.open>a{outline:0}.dropdown-menu-right{right:0;left:auto}.dropdown-menu-left{right:auto;left:0}.dropdown-header{display:block;padding:3px 20px;font-size:12px;line-height:1.42857143;color:#777;white-space:nowrap}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{content:"";border-top:0;border-bottom:4px dashed;border-bottom:4px solid\9}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:2px}@media (min-width:768px){.navbar-right .dropdown-menu{right:0;left:auto}.navbar-right .dropdown-menu-left{right:auto;left:0}}.btn-group,.btn-group-vertical{position:relative;display:inline-block;vertical-align:middle}.btn-group-vertical>.btn,.btn-group>.btn{position:relative;float:left}.btn-group-vertical>.btn.active,.btn-group-vertical>.btn:active,.btn-group-vertical>.btn:focus,.btn-group-vertical>.btn:hover,.btn-group>.btn.active,.btn-group>.btn:active,.btn-group>.btn:focus,.btn-group>.btn:hover{z-index:2}.btn-group .btn+.btn,.btn-group .btn+.btn-group,.btn-group .btn-group+.btn,.btn-group .btn-group+.btn-group{margin-left:-1px}.btn-toolbar{margin-left:-5px}.btn-toolbar .btn,.btn-toolbar .btn-group,.btn-toolbar .input-group{float:left}.btn-toolbar>.btn,.btn-toolbar>.btn-group,.btn-toolbar>.input-group{margin-left:5px}.btn-group>.btn:not(:first-child):not(:last-child):not(.dropdown-toggle){border-radius:0}.btn-group>.btn:first-child{margin-left:0}.btn-group>.btn:first-child:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn:last-child:not(:first-child),.btn-group>.dropdown-toggle:not(:first-child){border-top-left-radius:0;border-bottom-left-radius:0}.btn-group>.btn-group{float:left}.btn-group>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-top-right-radius:0;border-bottom-right-radius:0}.btn-group>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{padding-right:8px;padding-left:8px}.btn-group>.btn-lg+.dropdown-toggle{padding-right:12px;padding-left:12px}.btn-group.open .dropdown-toggle{-webkit-box-shadow:inset 0 3px 5px rgba(0,0,0,.125);box-shadow:inset 0 3px 5px rgba(0,0,0,.125)}.btn-group.open .dropdown-toggle.btn-link{-webkit-box-shadow:none;box-shadow:none}.btn .caret{margin-left:0}.btn-lg .caret{border-width:5px 5px 0;border-bottom-width:0}.dropup .btn-lg .caret{border-width:0 5px 5px}.btn-group-vertical>.btn,.btn-group-vertical>.btn-group,.btn-group-vertical>.btn-group>.btn{display:block;float:none;width:100%;max-width:100%}.btn-group-vertical>.btn-group>.btn{float:none}.btn-group-vertical>.btn+.btn,.btn-group-vertical>.btn+.btn-group,.btn-group-vertical>.btn-group+.btn,.btn-group-vertical>.btn-group+.btn-group{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:not(:first-child):not(:last-child){border-radius:0}.btn-group-vertical>.btn:first-child:not(:last-child){border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn:last-child:not(:first-child){border-top-left-radius:0;border-top-right-radius:0;border-bottom-right-radius:4px;border-bottom-left-radius:4px}.btn-group-vertical>.btn-group:not(:first-child):not(:last-child)>.btn{border-radius:0}.btn-group-vertical>.btn-group:first-child:not(:last-child)>.btn:last-child,.btn-group-vertical>.btn-group:first-child:not(:last-child)>.dropdown-toggle{border-bottom-right-radius:0;border-bottom-left-radius:0}.btn-group-vertical>.btn-group:last-child:not(:first-child)>.btn:first-child{border-top-left-radius:0;border-top-right-radius:0}.btn-group-justified{display:table;width:100%;table-layout:fixed;border-collapse:separate}.btn-group-justified>.btn,.btn-group-justified>.btn-group{display:table-cell;float:none;width:1%}.btn-group-justified>.btn-group .btn{width:100%}.btn-group-justified>.btn-group .dropdown-menu{left:auto}[data-toggle=buttons]>.btn input[type=checkbox],[data-toggle=buttons]>.btn input[type=radio],[data-toggle=buttons]>.btn-group>.btn input[type=checkbox],[data-toggle=buttons]>.btn-group>.btn input[type=radio]{position:absolute;clip:rect(0,0,0,0);pointer-events:none}.input-group{position:relative;display:table;border-collapse:separate}.input-group[class*=col-]{float:none;padding-right:0;padding-left:0}.input-group .form-control{position:relative;z-index:2;float:left;width:100%;margin-bottom:0}.input-group .form-control:focus{z-index:3}.input-group-lg>.form-control,.input-group-lg>.input-group-addon,.input-group-lg>.input-group-btn>.btn{height:46px;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px}select.input-group-lg>.form-control,select.input-group-lg>.input-group-addon,select.input-group-lg>.input-group-btn>.btn{height:46px;line-height:46px}select[multiple].input-group-lg>.form-control,select[multiple].input-group-lg>.input-group-addon,select[multiple].input-group-lg>.input-group-btn>.btn,textarea.input-group-lg>.form-control,textarea.input-group-lg>.input-group-addon,textarea.input-group-lg>.input-group-btn>.btn{height:auto}.input-group-sm>.form-control,.input-group-sm>.input-group-addon,.input-group-sm>.input-group-btn>.btn{height:30px;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px}select.input-group-sm>.form-control,select.input-group-sm>.input-group-addon,select.input-group-sm>.input-group-btn>.btn{height:30px;line-height:30px}select[multiple].input-group-sm>.form-control,select[multiple].input-group-sm>.input-group-addon,select[multiple].input-group-sm>.input-group-btn>.btn,textarea.input-group-sm>.form-control,textarea.input-group-sm>.input-group-addon,textarea.input-group-sm>.input-group-btn>.btn{height:auto}.input-group .form-control,.input-group-addon,.input-group-btn{display:table-cell}.input-group .form-control:not(:first-child):not(:last-child),.input-group-addon:not(:first-child):not(:last-child),.input-group-btn:not(:first-child):not(:last-child){border-radius:0}.input-group-addon,.input-group-btn{width:1%;white-space:nowrap;vertical-align:middle}.input-group-addon{padding:6px 12px;font-size:14px;font-weight:400;line-height:1;color:#555;text-align:center;background-color:#eee;border:1px solid #ccc;border-radius:4px}.input-group-addon.input-sm{padding:5px 10px;font-size:12px;border-radius:3px}.input-group-addon.input-lg{padding:10px 16px;font-size:18px;border-radius:6px}.input-group-addon input[type=checkbox],.input-group-addon input[type=radio]{margin-top:0}.input-group .form-control:first-child,.input-group-addon:first-child,.input-group-btn:first-child>.btn,.input-group-btn:first-child>.btn-group>.btn,.input-group-btn:first-child>.dropdown-toggle,.input-group-btn:last-child>.btn-group:not(:last-child)>.btn,.input-group-btn:last-child>.btn:not(:last-child):not(.dropdown-toggle){border-top-right-radius:0;border-bottom-right-radius:0}.input-group-addon:first-child{border-right:0}.input-group .form-control:last-child,.input-group-addon:last-child,.input-group-btn:first-child>.btn-group:not(:first-child)>.btn,.input-group-btn:first-child>.btn:not(:first-child),.input-group-btn:last-child>.btn,.input-group-btn:last-child>.btn-group>.btn,.input-group-btn:last-child>.dropdown-toggle{border-top-left-radius:0;border-bottom-left-radius:0} -/*# sourceMappingURL=bootstrap.min.css.map */ \ No newline at end of file diff --git a/stylesheets/collapsible.css b/stylesheets/collapsible.css deleted file mode 100644 index 64a7d8b..0000000 --- a/stylesheets/collapsible.css +++ /dev/null @@ -1,358 +0,0 @@ -.collapsible, .side-nav { - box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 3px 1px -2px rgba(0, 0, 0, 0.2); -} - -.collapsible .collection { - margin: 0; - border: none; -} - -.collapsible { - margin-top: calc(1.5rem - 11px); -} - -.collapsible { - border-top: 1px solid #ddd; - border-right: 1px solid #ddd; - border-left: 1px solid #ddd; - margin: 0.5rem 0 1rem 0; -} - -.collapsible-header { - display: block; - cursor: pointer; - min-height: 3rem; - line-height: 3rem; - padding: 0 1rem; - background-color: #fff; - border-bottom: 1px solid #ddd; -} - -.collapsible-header i { - width: 2rem; - font-size: 1.6rem; - line-height: 3rem; - display: block; - float: left; - text-align: center; - margin-right: 1rem; -} - -.collapsible-body { - display: none; - border-bottom: 1px solid #ddd; - box-sizing: border-box; - padding: 2rem; -} - -.side-nav .collapsible, -.side-nav.fixed .collapsible { - border: none; - box-shadow: none; -} - -.side-nav .collapsible li, -.side-nav.fixed .collapsible li { - padding: 0; -} - -.side-nav .collapsible-header, -.side-nav.fixed .collapsible-header { - background-color: transparent; - border: none; - line-height: inherit; - height: inherit; - padding: 0 16px; -} - -.side-nav .collapsible-header:hover, -.side-nav.fixed .collapsible-header:hover { - background-color: rgba(0, 0, 0, 0.05); -} - -.side-nav .collapsible-header i, -.side-nav.fixed .collapsible-header i { - line-height: inherit; -} - -.side-nav .collapsible-body, -.side-nav.fixed .collapsible-body { - border: 0; - background-color: #fff; -} - -.side-nav .collapsible-body li a, -.side-nav.fixed .collapsible-body li a { - padding: 0 23.5px 0 31px; -} - -.collapsible.popout { - border: none; - box-shadow: none; -} - -.collapsible.popout > li { - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); - margin: 0 24px; - transition: margin 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94); -} - -.collapsible.popout > li.active { - box-shadow: 0 5px 11px 0 rgba(0, 0, 0, 0.18), 0 4px 15px 0 rgba(0, 0, 0, 0.15); - margin: 16px 0; -} - -.side-nav .collapsible { - margin: 0; -} - -.side-nav .collapsible-body > ul:not(.collapsible) > li.active, -.side-nav.fixed .collapsible-body > ul:not(.collapsible) > li.active { - background-color: #ee6e73; -} - -.side-nav .collapsible-body > ul:not(.collapsible) > li.active a, -.side-nav.fixed .collapsible-body > ul:not(.collapsible) > li.active a { - color: #fff; -} - -.side-nav .collapsible-body { - padding: 0; -} - -.side-nav li > a.btn-floating:hover { - background-color: #26a69a; -} - -ul.collapsible{ - list-style-type: none; - padding: 0; -} - -/*Material Icons*/ - - -.material-icons { - text-rendering: optimizeLegibility; - -webkit-font-feature-settings: 'liga'; - -moz-font-feature-settings: 'liga'; - font-feature-settings: 'liga'; -} - -.side-nav { - position: fixed; - width: 300px; - left: 0; - top: 0; - margin: 0; - -webkit-transform: translateX(-100%); - transform: translateX(-100%); - height: 100%; - height: calc(100% + 60px); - height: -moz-calc(100%); - padding-bottom: 60px; - background-color: #fff; - z-index: 999; - overflow-y: auto; - will-change: transform; - -webkit-backface-visibility: hidden; - backface-visibility: hidden; - -webkit-transform: translateX(-105%); - transform: translateX(-105%); -} - -.side-nav.right-aligned { - right: 0; - -webkit-transform: translateX(105%); - transform: translateX(105%); - left: auto; - -webkit-transform: translateX(100%); - transform: translateX(100%); -} - -.side-nav .collapsible { - margin: 0; -} - -.side-nav li { - float: none; - line-height: 48px; -} - -.side-nav li.active { - background-color: rgba(0, 0, 0, 0.05); -} - -.side-nav li > a { - color: rgba(0, 0, 0, 0.87); - display: block; - font-size: 14px; - font-weight: 500; - height: 48px; - line-height: 48px; - padding: 0 32px; -} - -.side-nav li > a:hover { - background-color: rgba(0, 0, 0, 0.05); -} - -.side-nav li > a.btn, .side-nav li > a.btn-large, .side-nav li > a.btn-large, .side-nav li > a.btn-flat, .side-nav li > a.btn-floating { - margin: 10px 15px; -} - -.side-nav li > a.btn, .side-nav li > a.btn-large, .side-nav li > a.btn-large, .side-nav li > a.btn-floating { - color: #fff; -} - -.side-nav li > a.btn-flat { - color: #343434; -} - -.side-nav li > a.btn:hover, .side-nav li > a.btn-large:hover, .side-nav li > a.btn-large:hover { - background-color: #2bbbad; -} - -.side-nav li > a.btn-floating:hover { - background-color: #26a69a; -} - -.side-nav li > a > i, -.side-nav li > a > [class^="mdi-"], .side-nav li > a li > a > [class*="mdi-"], -.side-nav li > a > i.material-icons { - float: left; - height: 48px; - line-height: 48px; - margin: 0 32px 0 0; - width: 24px; - color: rgba(0, 0, 0, 0.54); -} - -.side-nav .divider { - margin: 8px 0 0 0; -} - -.side-nav .subheader { - cursor: initial; - pointer-events: none; - color: rgba(0, 0, 0, 0.54); - font-size: 14px; - font-weight: 500; - line-height: 48px; -} - -.side-nav .subheader:hover { - background-color: transparent; -} - -.side-nav .userView { - position: relative; - padding: 32px 32px 0; - margin-bottom: 8px; -} - -.side-nav .userView > a { - height: auto; - padding: 0; -} - -.side-nav .userView > a:hover { - background-color: transparent; -} - -.side-nav .userView .background { - overflow: hidden; - position: absolute; - top: 0; - right: 0; - bottom: 0; - left: 0; - z-index: -1; -} - -.side-nav .userView .circle, .side-nav .userView .name, .side-nav .userView .email { - display: block; -} - -.side-nav .userView .circle { - height: 64px; - width: 64px; -} - -.side-nav .userView .name, -.side-nav .userView .email { - font-size: 14px; - line-height: 24px; -} - -.side-nav .userView .name { - margin-top: 16px; - font-weight: 500; -} - -.side-nav .userView .email { - padding-bottom: 16px; - font-weight: 400; -} - -.drag-target { - height: 100%; - width: 10px; - position: fixed; - top: 0; - z-index: 998; -} - -.side-nav.fixed { - left: 0; - -webkit-transform: translateX(0); - transform: translateX(0); - position: fixed; -} - -.side-nav.fixed.right-aligned { - right: 0; - left: auto; -} - -@media only screen and (max-width: 992px) { - .side-nav.fixed { - -webkit-transform: translateX(-105%); - transform: translateX(-105%); - } - .side-nav.fixed.right-aligned { - -webkit-transform: translateX(105%); - transform: translateX(105%); - } - .side-nav a { - padding: 0 16px; - } - .side-nav .userView { - padding: 16px 16px 0; - } -} - -.side-nav .collapsible-body > ul:not(.collapsible) > li.active, -.side-nav.fixed .collapsible-body > ul:not(.collapsible) > li.active { - background-color: #ee6e73; -} - -.side-nav .collapsible-body > ul:not(.collapsible) > li.active a, -.side-nav.fixed .collapsible-body > ul:not(.collapsible) > li.active a { - color: #fff; -} - -.side-nav .collapsible-body { - padding: 0; -} - -#sidenav-overlay { - position: fixed; - top: 0; - left: 0; - right: 0; - height: 120vh; - background-color: rgba(0, 0, 0, 0.5); - z-index: 997; - will-change: opacity; -} \ No newline at end of file diff --git a/stylesheets/dropdown.css b/stylesheets/dropdown.css index 4841e3b..7db067c 100644 --- a/stylesheets/dropdown.css +++ b/stylesheets/dropdown.css @@ -6,7 +6,7 @@ } .formats li { - width: 160px; + width: 100%; } .level-formats { @@ -14,7 +14,7 @@ } .level-formats li { - width: 160px; + width: 100%; } .dropdown li { @@ -27,20 +27,10 @@ padding: 8px 16px; } -.dropdown-submenu { - position: relative; -} - -.dropdown-submenu .dropdown-menu { - top: 0; - left: 100%; - margin-top: -1px; -} - .commands li { - width: 120px; + width: 100%; } .schedule-input li { - width: 120px; -} \ No newline at end of file + width: 100%; +} diff --git a/stylesheets/getmdl-select.min.css b/stylesheets/getmdl-select.min.css deleted file mode 100644 index 8637282..0000000 --- a/stylesheets/getmdl-select.min.css +++ /dev/null @@ -1,3 +0,0 @@ -.getmdl-select .mdl-icon-toggle__label{float:right;margin-top:-30px;color:rgba(0,0,0,0.4)}.getmdl-select.is-focused .mdl-icon-toggle__label{color:#3f51b5}.getmdl-select .mdl-menu__container{width:100% !important;overflow:hidden}.getmdl-select .mdl-menu__container .mdl-menu .mdl-menu__item{font-size:16px}.getmdl-select__fullwidth .mdl-menu{width:100%}.getmdl-select__fix-height .mdl-menu__container{overflow-y:auto;max-height:300px !important}.getmdl-select__fix-height .mdl-menu.mdl-menu--top-left{bottom:auto;top:0} - -/*# sourceMappingURL=getmdl-select.min.css.map */ diff --git a/stylesheets/style.css b/stylesheets/style.css index 007f45d..fbd4aac 100644 --- a/stylesheets/style.css +++ b/stylesheets/style.css @@ -1,263 +1,266 @@ -body{ - background: #f6f6f6; - color:black; +ul { + list-style-type: none; } -/* -footer{ - position: relative; - bottom: 0; -}*/ -.light-bg{ - background:#fff; +a { + font-weight: 400; } -/*.light-bg{ - position: relative; +p { + line-height: 1.5; } -.light-bg:after { - content : ""; - display: block; - position: absolute; - top: 0; - left: 0; - background-image: url('./images/space.png'); - background-size: 160%; - background-position: 30% 20%; - width: 100%; - height: 100%; - opacity : 0.8; - z-index: -1; -}*/ - -body { - -webkit-text-size-adjust: 100%; +.sortable { + margin: 0px; + padding: 0px; } -.menu-title{ - color:white; -/* font-size: 20px; -*/} - -.color-grey{ - color: #9e9e9e; +.sortable li { + float: left; + padding-left: 0px; + padding-right: 14px; + padding-top: 0px; + padding-bottom: 0px; + margin-top: 0px; + margin-bottom: 6px; } -.titles-grey{ - color:#323232; +.parent-center { + display: flex; + justify-content: center; + align-items: center; } -.dark-bg{ - background: #eee; +.help-btn { + width: 22px; + height: 22px; + min-width: initial; } -.taco-small{ - background: url("./images/taco-small.png"); +.centered-img { + display: block; + margin-left: auto; + margin-right: auto; } -.body-text{ - text-align: justify; +.schedule-input { + width: 200px; } -.full-text{ - margin-left: 20px; - margin-right: 20px; +.schedule-list { + margin: 0px; + padding: 0px; } -.whytaco-icon{ - width: 160px; - height: 160px; +.schedule-list li { + float: left; + padding-right: 14px; + padding-top: 0px; + padding-bottom: 0px; + margin-bottom: 0px; } -.banner{ - height: 160px; - margin:0; - padding-left: 20px; - padding-top: 50px; +.space-font { + font-family: monospace; } -.mdl-layout__header-row{ - padding-left: 30px; +.space-font li { + font-family: monospace; } -a{ - text-decoration: none; +.horizontal li { + display: inline; } -.fast-textbox,.easy-textbox, .versatile-textbox, .whytaco-box{ - margin:auto; - width:80%; -/* color:white; -*/} +.add-reorder { + line-height: 60px; +} -.mit-news{ - background: url('../images/mit_tensor_algebra.jpg') no-repeat #fff; - background-size: 360px; - background-position: 50% 10%; +li { + list-style: none; } -.scientific-computing{ - background: url('../images/scientific_computing_thumbnail.png') no-repeat #fff; - background-size: 260px; - background-position: 50% 10%; +h1, h2, h3, h4, h5, h6 { + font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", "Helvetica", "Arial", sans-serif; } -.machine-learning{ - background: url('../images/machine_learning_thumbnail.png') no-repeat #fff; - background-size: 320px; - background-position: 50% 20%; +.mdl-grid { + padding-left: 0px; + padding-right: 0px; } -.data-analytics{ - background: url('../images/data_analytics_thumbnail.png') no-repeat #fff; - background-size: 320px; - background-position: 50% 0%; +.format-selector { + display: flex; + align-items: center; + flex-wrap: nowrap; + min-height: 75px; } -.performance-engineering{ - background: url('../images/speed.png') no-repeat #fff; - background-size: 160px; - background-position: 50% 30%; +.format-selector > div { + padding-right: 28px; } -.demo-card-container { - min-width: 325px; +.format-selector .dropdown-menu { + min-width: 190px; } -.demo-card-square{ - margin-left:auto; - margin-right: auto; +.schedule-dropdown .dropdown-menu { + min-width: 200px; } -.demo-card-square.mdl-card { - width: 95%; - height: 320px; +.optional-header { + display: inline; } -ul { - list-style-type: none; +#formatHeading { + padding-left: 68px; } -.video-card-square.mdl-card { - margin-left:auto; - margin-right: auto; - width: 95%; - height: 360px; -} +@media (max-width: 580px) { + .format-selector { + flex-wrap: wrap; + } -.sortable { - margin: 0px; - padding: 0px; -} + .format-selector li { + padding-right: 50px; + } + + .schedule-list li { + padding-right: 50px; + } + + .optional-header { + display: none; + } -.sortable li { - float: left; - width: 160px; - padding: 0.5em; - padding-top: 0px; - padding-bottom: 0px; - margin-top: 5px; + #formatHeading { + padding-left: 58px; + } } -/*Publications: */ -.demo-list-three { - width: 650px; - margin:0 auto; -} +@media (max-width: 480px) { + .format-selector li { + padding-right: 0px; + } -.paper{ - padding: 0; + .schedule-list li { + padding-right: 0px; + } } -.bibtex{ - white-space: pre-wrap; - padding: 0px; - padding-left: 0; - border-radius: 10px; - margin: 0px; - line-height: 150%; +.box > p { + word-break: word-wrap; + white-space: normal; } -.getpdf{ - width: 100%; - margin-bottom: 10px; +.button.has-text-spaced { + justify-content: space-between; } -.parent-center { - display: flex; - justify-content: center; - align-items: center; +.label > small { + font-weight: 400; } -.home-header { - padding-left: 12px; +.input-bar { + display: flex; + flex-wrap: nowrap; } -.normal-section-header { - padding-bottom: 0px; +.input-bar-misc { + display: flex; + justify-content: space-between; + min-width: 425px; } -.normal-section-header > div { - margin-bottom: 0px; +#btnExamples { + margin-left: 8px; + margin-right: 8px; + margin-bottom: 20px; + margin-top: 25px; } .demo-btn { - width: 100%; - font-weight: 400; + margin-top: 20px; + width: 175px; + min-width: 175px; } -.help-btn { - width: 22px; - height: 22px; - min-width: initial; -} +@media (max-width: 875px) { + .input-bar { + flex-wrap: wrap; + } -.help-menu { - padding: 10px; - width: 360px; - color: black; -} + .input-bar-misc { + width: 100%; + min-width: 0px; + } + + .expr-input { + padding-bottom: 5px; + } + + .is-invalid { + padding-bottom: 24px; + } -.help-menu p { - white-space: initial; + #btnExamples { + margin-left: 0px; + } + + .demo-btn { + margin-top: 15px; + } + + .prefix-input { + padding-top: 15px; + } + + #btnExamples { + margin-top: 20px; + } } -.centered-img { - display: block; - margin-left: auto; - margin-right: auto; +.prefix-input { + flex-grow: 1; + margin-right: 15px; } -.schedule-input { - width: 120px; +.expr-input { + width: 100%; } -.schedule-list { - margin: 0px; - padding: 0px; +.sample-button { + margin-bottom: 8px; } -.schedule-list li { - float: left; - padding: 0.75em; - padding-top: 0px; - padding-bottom: 0px; - margin-top: 5px; +#cellBtnDownload { + padding-right: 0px; } -.space-font { - font-family: monospace; +@media (max-width: 474px) { + #cellBtnDownload { + display: none; + } + + .output-panel { + margin-top: 0px; + } } -.space-font li { - font-family: monospace; +@media (max-width: 500px) { + .prefix-input { + display: none; + } + + .demo-btn { + width: 100%; + } } -.horizontal li { - display: inline; +.level-formats .dropdown-item { + padding-right: 16px; } -.add-reorder { - line-height: 60px; +#listExamples .long-name { + display: none; } diff --git a/taco-tools.pdf b/taco-tools.pdf deleted file mode 100644 index 6b6f729..0000000 Binary files a/taco-tools.pdf and /dev/null differ