Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Refactor] Just-In-Time Compilation Pipeline #1313

Merged
merged 23 commits into from Feb 16, 2024
Merged

Conversation

nathanielsimard
Copy link
Member

Refactor how the compilation pipeline works. With this change, the lower-level compilers have fewer things to do, while the high-level gpu representation supports more operations that can be expanded at compile time to lower-level instructions.

This is the first step in implementing algorithms at the gpu representation level instead of at the wgsl level. More refactoring PRs will be done before migrating more algorithms.

@nathanielsimard nathanielsimard marked this pull request as draft February 14, 2024 23:09
@nathanielsimard nathanielsimard marked this pull request as ready for review February 15, 2024 21:34
Copy link
Member

@louisfd louisfd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only some typos as usual :)

///
/// Notes:
///
/// This type isn't reaponsable for creating [shader bindings](super::Binding) and figuring out which
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

responsible

///
/// Notes:
///
/// This should only by used when doing compilation.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

be

}
}

/// Returns the variables and operations to be decled and executed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

declared, i guess?

Operation::Operator(op) => Operation::Operator(op.vectorize(vectorization)),
Operation::Algorithm(op) => Operation::Algorithm(op.vectorize(vectorization)),
Operation::Metadata(_) => panic!(
"Metadata can't be vectorize, they should only be generated after vectorization."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vectorized

"Metadata can't be vectorize, they should only be generated after vectorization."
),
Operation::Loop(_) => panic!(
"Loops can't be vectorize, they should only be generated after vectorization."
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vectorized

use burn_fusion::TensorDescription;
use serde::{Deserialize, Serialize};

/// A trace encaptulate all information necessary to perform the compilation and execution of
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

encapsulates

@nathanielsimard nathanielsimard merged commit 843dd49 into main Feb 16, 2024
12 checks passed
@nathanielsimard nathanielsimard deleted the refactor/wgpu/scope branch February 16, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants