Skip to content

Improve model tracer infra#37390

Open
Aswinmcw wants to merge 131 commits intomainfrom
Aswinmcw/new_trace_infra
Open

Improve model tracer infra#37390
Aswinmcw wants to merge 131 commits intomainfrom
Aswinmcw/new_trace_infra

Conversation

@Aswinmcw
Copy link
Contributor

@Aswinmcw Aswinmcw commented Feb 9, 2026

Ticket

NA

Problem description

Model tracer is using c++ graph tracer which is not perfect

What's changed

Remove the graph tracer dependencies and used python tracer to make it more effective
Left old infra intact till we completely migrate to new infra
Added new infra files as _v2
This PR just adds the infra changes, upcoming PR will contain changes to the sweep test that will work with _v2 loader

Checklist

  • All post-commit tests
  • Blackhole Post commit
  • cpp-unit-tests
  • New/Existing tests provide coverage for changes

Model tests

If your changes cover model-related code, you should run tests corresponding to affected models and platforms (Single card, T3K, Galaxy). "Choose your pipeline" workflows facilitate running multiple kinds of tests in a single run. Each offers models-mandatory and models-extended presets.
The former includes a minimal set of tests, to be run always. The latter extends that with additional ones - use your best judgement in deciding which is the most appropriate for your PR.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 12 out of 13 changed files in this pull request and generated 7 comments.

Comments suppressed due to low confidence (1)

tests/sweep_framework/load_ttnn_ops_data_v2.py:213

  • The V2 schema (model_tracer/destructively_create_ttnn_ops_schema_v2.sql) defines ttnn_ops_v2.ttnn_mesh_config with only (mesh_shape, device_count), but this loader still inserts/selects placement_type/shard_dim/distribution_shape columns. This will fail at runtime against the V2 schema. Update get_or_create_mesh_config and its callers to match the V2 table definition (and adjust the mesh_key uniqueness accordingly), or target the V1 schema if placement fields are required.
    if mesh_key not in mesh_config_cache:
        cur.execute(
            """
            INSERT INTO ttnn_ops_v2.ttnn_mesh_config (mesh_shape, device_count, placement_type, shard_dim, distribution_shape)
            VALUES (%s, %s, %s, %s, %s)
            ON CONFLICT (mesh_shape, device_count, placement_type, shard_dim, distribution_shape) DO NOTHING
            RETURNING ttnn_mesh_config_id
        """,
            (mesh_shape, device_count, placement_type, shard_dim, distribution_shape),

@Aswinmcw Aswinmcw marked this pull request as ready for review February 11, 2026 10:57
@stevendae
Copy link
Contributor

Do not merge until my approval is complete.

@stevendae
Copy link
Contributor

this merge would still continue to use the v1 schema until sweeps_parameter_generator.py imports master_config_loader_v2.py.

I see the intent. Implement changes without changing core workflow just yet.

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.

3 participants