RobertoRosmaninho's Blog

Final Report

RobertoRosmaninho
Published: 08/24/2021

This week I focused in prepare this document and get the last PR approved. Also, I tried to fix the 2 last Issues opened.

GSOC Final Report

After ten weeks of hard work on the project "LLVM Back-end for the Tensor Algebra Compiler" for Google Summer of Code 2021 I was able to develop the following contributions:

  • Support for branch and loop operations (IfThenElse, While, For)
  • Support for binary and unary operations (Neg, Sub, Div, Rem, Min, Max, And, Or, BitOr, BitAnd)
  • Support for comparison operators (LTE, GTE, LT, GT, EQ, NEQ)
  • Support for other operations (Assign, Cast, Case, Indices property, Comment, BlankLine)
  • Support for booleans
  • Added new tests to assess the correctness of new operations

These contributions allow the basic use of TACO with LLVM like arithmetic operations on sparse or dense tensors passed as command-line arguments with llvm flag or using the TACO C++ Library.

The project resulted in 6 Pull Requests and 5 Issues. Five PRs were merged, and one was closed because its content was already been developed by Guilherme, my mentor, on another branch. 3 Issues are still open.

The project can be separated into 3 phases:

  • First impressions and branch update
  • Implementation of Basic Operations
  • Fix old implementation, test writing, and searching for bugs

The first phase was developed in the two first weeks and resulted in the following PRs:

The first phase was to update the llvm-backend branch that I used on the project with the new alterations on the main, and update the readme with instructions to use TACO with LLVM support using a conda environment.

I opened an issue to inform that the LLVM IR generated by TACO lacks information of the target machine when compared with the IR generated by clang:

This issue was not resolved yet because it doesn't impact the program operation and IR generation.

The second and main phase was developed from the third to the eighth week and resulted in the following PRs:

The main implementation was developed during these weeks with the assistance of my mentor Guilherme Leobas. As mentioned before, the first PR wasn't merged because its content was already been implemented on PR #7. The issues that I opened and solved during these weeks were the following:

The last two weeks of development was used to write new tests, find bugs on corner cases and format the code resulting in the following PRs:

The tests were implemented on a separated folder called "llvm-examples" and on gTest, the framework used by taco to automate tests. The following Issues were opened due to bugs found on these tests:

These issues are the start point for future improvements on the project.

This experience was excellent, I could learn more about TACO, LLVM, compilers, open-source cooperation, and development. I hope to be able to continue contributing to this project soon.

View Blog Post

Weekly check-in #10

RobertoRosmaninho
Published: 08/19/2021

What did I do this week?

Focused in Yield Support!

Did I get stuck anywhere?

No. :)
View Blog Post

Weekly check-in #9

RobertoRosmaninho
Published: 08/09/2021

What did I do this week?

This past week, I focused on implementing new llvm tests for TACO's gTest suite. I opened a new PR (#17), which includes more than 15 new tests of dense and sparse expressions. A new bug was found during this implementation: the missing support for realloc expression under Allocate Op. I fixed this bug and all tests implemented are passing now.

What is coming up?

In the last week of GSOC, I will replicate some tests already in use on TACO's gTest framework to generate LLVM IR code and start the implementation of Yield Op.

Did I get stuck anywhere?

No. :)
View Blog Post

Weekly check-in #9

RobertoRosmaninho
Published: 08/04/2021

What did I do this week?

This past week I only contribute to PR #14 and study the gTest framework to implement new llvm tests for taco CI. Also, a new bug was found: The iterate function used by pack() needs the implementation of Yield Op, which lacks support yet.

What is coming up?

This week I'll focus on implementing new tests on the TACO's gTest suite and study the Yield Op behavior.

Did I get stuck anywhere?

No. :)
View Blog Post

Weekly check-in #8

RobertoRosmaninho
Published: 07/28/2021

What did I do this week?

This past week I focused on implementing the Allocate Op, which I discovered to be the cause of issues #9 and #11. Mainly, I'm working to store on the original struct the tensor values and indices used on a function.

What is coming up?

This week, I'll focus on finishing this implementation and contribute to PR #14. This PR implements the Allocate OP and enables llvm tests to continuous integration with GitHub Actions.

Did I get stuck anywhere?

Yes, I got stuck in understanding the behavior of Allocate Op, but my mentor was able to help me with this issue.
View Blog Post
DJDT

Versions

Time

Settings from gsoc.settings

Headers

Request

SQL queries from 1 connection

Static files (2312 found, 3 used)

Templates (28 rendered)

Cache calls from 1 backend

Signals

Log messages