Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
abb51b0
Build with ubuntu-22.04 for better compatibility (#426)
yijie-yang Jul 30, 2025
11627c2
Update UI bundle
jinjingforever Jul 30, 2025
9c0cd40
Merge pull request #429 from google-ai-edge/updateui
jinjingforever Jul 30, 2025
a0c2dd6
Update pyproject.toml (#428)
yijie-yang Jul 30, 2025
938b654
Automated Code Change
a-googler Jul 31, 2025
d4224b7
Add id, name, and namespace to node attrs for matching nodeAttrsToHid…
a-googler Jul 31, 2025
87eae94
Internal cleanup
a-googler Aug 1, 2025
079bb17
Correctly show edge labels on edges that go straight up
a-googler Aug 2, 2025
e912741
Log error messages when parse MLIR failed
yijie-yang Aug 5, 2025
8f4d7a3
Fix failed to read error for mlir file
yijie-yang Aug 6, 2025
e425741
Allow users to toggle "only show edges connected to selected node" an…
a-googler Aug 7, 2025
22e4f4b
Allow users to specify which graph the edge overlay belongs to.
a-googler Aug 8, 2025
c5a8f7e
Add reference to VGF adapter
CareyJWilliams Aug 7, 2025
51d84d7
Merge pull request #436 from CareyJWilliams/main
jinjingforever Aug 11, 2025
a8c032c
Hermetic CUDA was moved from XLA to rules_ml_toolchain open sourced r…
a-googler Aug 19, 2025
648448f
Fix the cell-embedded url, and update the quick start notebook to mak…
jinjingforever Aug 19, 2025
c664e30
update formatting
jinjingforever Aug 19, 2025
03a92fc
Merge pull request #440 from google-ai-edge/fixopeninnewtab
jinjingforever Aug 20, 2025
0d0f681
Internal changes
yijie-yang Aug 22, 2025
8565641
No public description
yijie-yang Aug 22, 2025
026dc29
Update api to allow setting view on edge for all options.
a-googler Aug 22, 2025
2013389
Internal changes
yijie-yang Aug 25, 2025
f59ec4f
Bump python package and adapter version. Update JS bundle.
jinjingforever Aug 25, 2025
e286492
Add JAX visualization tutorial (#445)
yijie-yang Aug 25, 2025
23df117
Merge pull request #446 from google-ai-edge/newrelase0_1_25
jinjingforever Aug 25, 2025
149977e
Refactor `UniqueOpNamesPass` to improve hierarchical naming.
yijie-yang Aug 26, 2025
0ace50b
No public description
Varcho Aug 27, 2025
50627a8
Add "download json graph" to layer's menu
a-googler Sep 2, 2025
175af3d
Fix formatting error
jinjingforever Sep 2, 2025
dd75be2
Add support for custom node text color.
a-googler Sep 3, 2025
fe7ca81
Merge pull request #452 from google-ai-edge/fixformat
jinjingforever Sep 3, 2025
5d6f31d
Replace `\n` from the labels with empty string before searching.
a-googler Sep 3, 2025
90b6e57
Automated Code Change
a-googler Sep 4, 2025
106f940
Add support for horizontal layout for specific group nodes (available…
a-googler Sep 5, 2025
ce93bb8
Add python 3.13 to workflow files (#458)
yijie-yang Sep 9, 2025
d1cc603
Add python 3.13 tag to package config
jinjingforever Sep 9, 2025
9459617
Add Python 3.13 support to AI Edge Model Explorer Adapter
yijie-yang Sep 9, 2025
e4e4b87
Merge pull request #459 from google-ai-edge/updatepyversion
jinjingforever Sep 10, 2025
bb4c696
Add reference to TOSA adapter (#463)
CareyJWilliams Sep 11, 2025
c8698f2
Merge remote-tracking branch 'upstream/main' into chore/merge-upstrea…
madcampos Sep 11, 2025
df9dfff
Allow customizing node border width in WebGL renderer and defaults to…
a-googler Sep 15, 2025
42ba507
Update version and JS bundle
jinjingforever Sep 15, 2025
e1b2bae
Merge pull request #465 from google-ai-edge/0_1_26_release
jinjingforever Sep 15, 2025
e633520
This change prepares for the removal of the Zone change detection pro…
a-googler Sep 16, 2025
28a0f56
Update `rules_python` to v1.6 in MLIR LITE.
a-googler Sep 19, 2025
5fd162e
Allow displaying attributes alongside node IDs in the info panel.
a-googler Sep 22, 2025
1b65238
Removes usages of deprecated APIs from Angular Material
a-googler Sep 29, 2025
04f1e99
No public description
a-googler Sep 30, 2025
a761a9f
No public description
jpienaar Oct 1, 2025
cc8625c
Merge branch 'main' into chore/merge-upstream-2025-09-11
madcampos Oct 1, 2025
bf87cd9
Merge commit 'a761a9f87f7446e6bdcb91088d681412501c2c04' into chore/me…
madcampos Oct 1, 2025
c2ea231
fix: merge conflict
madcampos Oct 3, 2025
9bef90b
fix: tabs formatting
madcampos Oct 3, 2025
ee48cb7
chore: rebuild project
madcampos Oct 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_release_adapters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
fail-fast: false
matrix:
runner: [ubuntu-22.04, macos-latest, ubuntu-22.04-arm]
python-version: ['3.9', '3.10', '3.11', '3.12']
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
runs-on: ${{ matrix.runner }}
steps:
- name: Checkout code
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test_build_single_adapter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,11 @@ on:
default: "3.11"
type: choice
options:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- '3.13'
- '3.12'
- '3.11'
- '3.10'
- '3.9'

package-version:
description: "Package Version"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ instructions and check out its [demos](src/custom_element_demos/).

- ONNX Adapter: https://github.com/justinchuby/model-explorer-onnx
- VGF Adapter: https://github.com/arm/vgf-adapter-model-explorer
- TOSA Adapter: https://github.com/arm/tosa-adapter-model-explorer

## Contributions

Expand Down
8 changes: 7 additions & 1 deletion src/builtin-adapter/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ build --host_copt=-DGRPC_BAZEL_BUILD
build --action_env=GRPC_BAZEL_RUNTIME=1
build --repo_env=PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=upb
build --action_env=PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=upb
build --repo_env=RULES_PYTHON_ENABLE_PYSTAR=0

# Some targets have the same py source file, but use different
# configurations via `requires-` tags. This results in an action
# conflict when precompiling. Disable to avoid that problem.
# See https://github.com/bazel-contrib/rules_python/issues/2445
build --@rules_python//python/config_settings:precompile=force_disabled

# Do not do this. This is how gRPC builds itself by default, but we don't want
# that as it would link protobuf into its own set of dynamic libraries, which
# would conflict with our protobuf linkage.
Expand Down
4 changes: 2 additions & 2 deletions src/builtin-adapter/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ rules_shell_toolchains()
# b) get the sha256 hash of the commit by running:
# curl -L https://github.com/tensorflow/tensorflow/archive/<COMMIT_HASH>.tar.gz | sha256sum
# and update TENSORFLOW_SHA256 with the result.
TENSORFLOW_COMMIT = "1e03bc9bb2fdccdb58a1a809e3358030b9e498b2"
TENSORFLOW_COMMIT = "ec7c1948718638d4e63a68ce511c8425d930b7d9"

TENSORFLOW_SHA256 = "0641196b87046cbaefcc4a627cb2d97a3eca6a41ec72f3447655cf45557071f0"
TENSORFLOW_SHA256 = "f67de8c5db765f11ffb7ef28bac151398e46f76c74b3d5c156bc894ec54b0bfb"

http_archive(
name = "org_tensorflow",
Expand Down
16 changes: 16 additions & 0 deletions src/builtin-adapter/formats/schema_structs.cc
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,22 @@ llvm::json::Object TasksData::Json() const {
return json_tasks_data;
}

const char GroupNodeConfig::kNamespaceRegex[] = "namespaceRegex";
const char GroupNodeConfig::kLayoutDirection[] = "layoutDirection";

llvm::json::Object GroupNodeConfig::Json() const {
llvm::json::Object json_config;
json_config[kNamespaceRegex] = namespace_regex;
if (layout_direction.has_value()) {
json_config[kLayoutDirection] = (int)layout_direction.value();
}
return json_config;
}

const char Subgraph::kSubgraphId[] = "id";
const char Subgraph::kNodes[] = "nodes";
const char Subgraph::kTasksData[] = "tasksData";
const char Subgraph::kGroupNodeConfigs[] = "groupNodeConfigs";

llvm::json::Object Subgraph::Json() const {
llvm::json::Object json_subgraph;
Expand All @@ -191,6 +204,9 @@ llvm::json::Object Subgraph::Json() const {
if (tasks_data.has_value()) {
json_subgraph[kTasksData] = tasks_data->Json();
}
if (!group_node_configs.empty()) {
json_subgraph[kGroupNodeConfigs] = ToJsonArray(group_node_configs);
}
return json_subgraph;
}

Expand Down
23 changes: 23 additions & 0 deletions src/builtin-adapter/formats/schema_structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,26 @@ struct TasksData {
static const char kEdgeOverlaysDataListRightPane[];
};

/// Layout direction for group nodes.
enum class LayoutDirection {
kTopBottom = 0,
kLeftRight = 1,
};

/// Configuration for a group node.
struct GroupNodeConfig {
/// The regex to match against the namespace of group nodes.
std::string namespace_regex;
/// Whether to expand the group node by default.
std::optional<LayoutDirection> layout_direction;

llvm::json::Object Json() const;

private:
static const char kNamespaceRegex[];
static const char kLayoutDirection[];
};

/// A subgraph corresponds to a single renderable graph with an ID and a list of
/// nodes.
struct Subgraph {
Expand All @@ -219,13 +239,16 @@ struct Subgraph {
std::vector<GraphNode> nodes;
/// Data for various tasks that provide extra data to be visualized.
std::optional<TasksData> tasks_data;
/// Custom configs for group nodes.
std::vector<GroupNodeConfig> group_node_configs;

llvm::json::Object Json() const;

private:
static const char kSubgraphId[];
static const char kNodes[];
static const char kTasksData[];
static const char kGroupNodeConfigs[];
};

/// A logical grouping of subgraphs with a shared label.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PYTHON="${CI_BUILD_PYTHON:-python3}"
PYTHON_VERSION="$(${PYTHON} --version | cut -d " " -f 2)"
IFS='.' read -ra VERSION_PARTS <<< "${PYTHON_VERSION}"
# TF only supports python version ["3.9", "3.10", "3.11", "3.12"].
# TF supports python version ["3.9", "3.10", "3.11", "3.12", "3.13"].
export TF_PYTHON_VERSION="${VERSION_PARTS[0]}.${VERSION_PARTS[1]}"
export PROJECT_NAME=${WHEEL_PROJECT_NAME:-ai_edge_model_explorer_adapter}
BUILD_DIR="gen/adapter_pip"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: 3.12',
'Programming Language :: Python :: 3.13',
'Topic :: Scientific/Engineering',
'Topic :: Scientific/Engineering :: Mathematics',
'Topic :: Scientific/Engineering :: Artificial Intelligence',
Expand Down
36 changes: 20 additions & 16 deletions src/builtin-adapter/translate_helpers.cc
Original file line number Diff line number Diff line change
Expand Up @@ -196,19 +196,22 @@ void AddCustomOptions(const ConstBytesAttr& const_bytes_attr,

// Adds attributes from block arguments to the graph node.
void AddBlockArgAttrs(const VisualizeConfig& config,
const mlir::BlockArgument& arg,
const mlir::DictionaryAttr& arg_attr_dict,
GraphNodeBuilder& builder) {
// TODO(b/412976666): Extract all attributes from block arguments, (currently
// only supports "sdy.shardings").
std::string value;
llvm::raw_string_ostream sstream(value);
mlir::sdy::TensorShardingAttr attr = mlir::sdy::getSharding(arg);
// Don't append sharding attribute to block argument if it is not sharded.
if (attr == mlir::sdy::TensorShardingAttr()) {
if (arg_attr_dict == nullptr) {
return;
}
PrintAttribute(attr, config.const_element_count_limit, sstream);
builder.AppendNodeAttribute(mlir::sdy::kShardingAttr, value);
for (const mlir::NamedAttribute& attr : arg_attr_dict) {
std::string value;
llvm::raw_string_ostream sstream(value);
const llvm::StringRef name = attr.getName();
const mlir::Attribute attr_val = attr.getValue();
if (SkipAttr(name)) {
continue;
}
PrintAttribute(attr_val, config.const_element_count_limit, sstream);
builder.AppendNodeAttribute(name, value);
}
}

// Appends node attributes to the graph node builder.
Expand Down Expand Up @@ -376,7 +379,8 @@ void AddGraphInputs(const VisualizeConfig& config, mlir::func::FuncOp& fop,
}
builder.AppendAttrToMetadata(EdgeType::kOutput, /*metadata_id=*/0,
kTensorShape, GetTypeString(it.value()));
AddBlockArgAttrs(config, fop.getArgument(it.index()), builder);

AddBlockArgAttrs(config, fop.getArgAttrDict(it.index()), builder);
subgraph.nodes.push_back(std::move(builder).Build());
}
}
Expand Down Expand Up @@ -623,11 +627,11 @@ absl::Status AddIncomingEdges(Operation& operation, GraphBuildContext& context,

// Iterates through all result values of an operation and adds the output
// metadata to the graph node.
void AddOutputsMetadata(Operation& operation, GraphBuildContext& context,
GraphNodeBuilder& builder) {
void AddOutputsMetadata(const VisualizeConfig& config, Operation& operation,
GraphBuildContext& context, GraphNodeBuilder& builder) {
Counter& tensor_counter = context.tensor_counter;
llvm::SmallVector<llvm::StringRef, 2> tensor_names;
if (IsTfliteDialect(operation)) {
if (IsTfliteDialect(operation) || config.add_tensor_name_attribute) {
tensor_names = GetTfliteTensorNames(operation);
}
for (int output_index = 0, e = operation.getNumResults(); output_index < e;
Expand Down Expand Up @@ -674,7 +678,7 @@ absl::Status AddNestedRegionNode(const VisualizeConfig& config,
RETURN_IF_ERROR(
MaybeAddNestedRegion(config, operation, context, builder, subgraph));
}
AddOutputsMetadata(operation, context, builder);
AddOutputsMetadata(config, operation, context, builder);
subgraph.nodes.push_back(std::move(builder).Build());
return absl::OkStatus();
}
Expand Down Expand Up @@ -939,7 +943,7 @@ absl::Status AddNode(const VisualizeConfig& config, Operation& operation,
}
RETURN_IF_ERROR(
MaybeAddNestedRegion(config, operation, context, builder, subgraph));
AddOutputsMetadata(operation, context, builder);
AddOutputsMetadata(config, operation, context, builder);
subgraph.nodes.push_back(std::move(builder).Build());
return absl::OkStatus();
}
Expand Down
4 changes: 4 additions & 0 deletions src/builtin-adapter/visualize_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ struct VisualizeConfig {
// exceeds this threshold, the rest of data will be elided. The default
// threshold is set to 16 (use -1 to print all).
int const_element_count_limit = 16;

// If true, adds the `tensor_name` meta attribute to the node from the MLIR
// location. This attribute is always added for the tfl dialect.
bool add_tensor_name_attribute = false;
};

} // namespace visualization_client
Expand Down
5 changes: 3 additions & 2 deletions src/server/package/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "ai-edge-model-explorer"
version = "0.1.25"
version = "0.1.26"
authors = [
{ name="Google LLC", email="opensource@google.com" },
]
Expand All @@ -12,13 +12,14 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: Apache Software License",
]
dependencies = [
"flask",
"ipython",
# Skip on windows.
"ai-edge-model-explorer-adapter == 0.1.11; sys_platform != 'win32'",
"ai-edge-model-explorer-adapter == 0.1.12; sys_platform != 'win32'",
"packaging",
"portpicker",
"requests",
Expand Down

This file was deleted.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

Loading