Skip to content

[Transform] apply_transform_config, consolidate test fixtures #348

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

Open
wants to merge 41 commits into
base: kylesayrs/transform_construct_cache_device
Choose a base branch
from

Conversation

kylesayrs
Copy link
Contributor

@kylesayrs kylesayrs commented Jun 10, 2025

Purpose

  • Implement transform apply method
  • Consolidate test fixtures

Prerequisites

Changes

  • Implement apply_transform_config
  • Use tests/test_transform/conftest.py to define a valid model and transform config for testing

Testing

  • Transform tests pass

kylesayrs added 30 commits May 30, 2025 13:40
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
Signed-off-by: Kyle Sayers <kylesayrs@gmail.com>
@kylesayrs kylesayrs changed the base branch from main to kylesayrs/transform_construct_cache_device June 12, 2025 03:27
@kylesayrs kylesayrs changed the title [Transform] Apply [Transform] apply_transform_config Jun 12, 2025
@kylesayrs kylesayrs changed the title [Transform] apply_transform_config [Transform] apply_transform_config, consolidate test fixtures Jun 12, 2025
@kylesayrs kylesayrs marked this pull request as ready for review June 12, 2025 03:34
Copy link
Contributor

@brian-dellabetta brian-dellabetta left a comment

Choose a reason for hiding this comment

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

One question on this ParameterizedDefaultDict usage

@@ -57,7 +58,8 @@ def create_transform(self, module: Module, args: TransformArgs):
exec_device = get_execution_device(module)

weight = self.weights.get(size, dtype, device, construct_device=exec_device)
return HadamardTransform(weight, args)
perm = self.perms[weight] if self.scheme.randomize else None
Copy link
Contributor

Choose a reason for hiding this comment

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

why doesn't this have to be

perm = self.perms.get(weight) if self.scheme.randomize else None

? Doesn't .get need to be called to instantiate the entry in the dict?

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.

2 participants