-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Unknown
committed
Nov 28, 2024
0 parents
commit 5931b7b
Showing
322 changed files
with
56,371 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Sphinx build info version 1 | ||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. | ||
config: fa01f909e356e60fb116b10450686202 | ||
tags: 645f666f9bcd5a90fca523b33c5a78b7 |
Empty file.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
636 changes: 636 additions & 0 deletions
636
_modules/chop/passes/graph/analysis/add_metadata/add_common_metadata.html
Large diffs are not rendered by default.
Oops, something went wrong.
588 changes: 588 additions & 0 deletions
588
_modules/chop/passes/graph/analysis/add_metadata/add_hardware_metadata.html
Large diffs are not rendered by default.
Oops, something went wrong.
179 changes: 179 additions & 0 deletions
179
_modules/chop/passes/graph/analysis/add_metadata/add_software_metadata.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,179 @@ | ||
<!DOCTYPE html> | ||
<html class="writer-html5" lang="en" data-content_root="../../../../../../"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>chop.passes.graph.analysis.add_metadata.add_software_metadata — MASE 0.0.1 documentation</title> | ||
<link rel="stylesheet" type="text/css" href="../../../../../../_static/pygments.css?v=80d5e7a1" /> | ||
<link rel="stylesheet" type="text/css" href="../../../../../../_static/css/theme.css?v=19f00094" /> | ||
<link rel="stylesheet" type="text/css" href="../../../../../../_static/graphviz.css?v=fd3f3429" /> | ||
<link rel="stylesheet" type="text/css" href="../../../../../../_static/sphinx-data-viewer/jsonview.bundle.css?v=f6ef2277" /> | ||
<link rel="stylesheet" type="text/css" href="../../../../../../_static/sphinx-needs/libs/html/datatables.min.css?v=4b4fd840" /> | ||
<link rel="stylesheet" type="text/css" href="../../../../../../_static/sphinx-needs/common_css/need_core.css?v=f5b60a78" /> | ||
<link rel="stylesheet" type="text/css" href="../../../../../../_static/sphinx-needs/common_css/need_toggle.css?v=5c6620df" /> | ||
<link rel="stylesheet" type="text/css" href="../../../../../../_static/sphinx-needs/common_css/need_style.css?v=678fb11e" /> | ||
<link rel="stylesheet" type="text/css" href="../../../../../../_static/sphinx-needs/common_css/needstable.css?v=5e1b6797" /> | ||
<link rel="stylesheet" type="text/css" href="../../../../../../_static/sphinx-needs/common_css/need_links.css?v=2150a916" /> | ||
<link rel="stylesheet" type="text/css" href="../../../../../../_static/sphinx-needs/modern.css?v=803738c0" /> | ||
<link rel="stylesheet" type="text/css" href="../../../../../../_static/sphinx-test-results/common.css?v=9ec2c1d5" /> | ||
|
||
|
||
<!--[if lt IE 9]> | ||
<script src="../../../../../../_static/js/html5shiv.min.js"></script> | ||
<![endif]--> | ||
|
||
<script src="../../../../../../_static/jquery.js?v=5d32c60e"></script> | ||
<script src="../../../../../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script> | ||
<script src="../../../../../../_static/documentation_options.js?v=d45e8c67"></script> | ||
<script src="../../../../../../_static/doctools.js?v=9a2dae69"></script> | ||
<script src="../../../../../../_static/sphinx_highlight.js?v=dc90522c"></script> | ||
<script src="../../../../../../_static/sphinx-data-viewer/jsonview.bundle.js?v=18cd53c5"></script> | ||
<script src="../../../../../../_static/sphinx-data-viewer/jsonview_loader.js?v=f7ff7e7d"></script> | ||
<script src="../../../../../../_static/sphinx-needs/libs/html/datatables.min.js?v=8a4aee21"></script> | ||
<script src="../../../../../../_static/sphinx-needs/libs/html/datatables_loader.js?v=a2cae175"></script> | ||
<script src="../../../../../../_static/sphinx-needs/libs/html/sphinx_needs_collapse.js?v=dca66431"></script> | ||
<script src="../../../../../../_static/js/theme.js"></script> | ||
<link rel="index" title="Index" href="../../../../../../genindex.html" /> | ||
<link rel="search" title="Search" href="../../../../../../search.html" /> | ||
</head> | ||
|
||
<body class="wy-body-for-nav"> | ||
<div class="wy-grid-for-nav"> | ||
<nav data-toggle="wy-nav-shift" class="wy-nav-side"> | ||
<div class="wy-side-scroll"> | ||
<div class="wy-side-nav-search" > | ||
|
||
|
||
|
||
<a href="../../../../../../index.html" class="icon icon-home"> | ||
MASE | ||
</a> | ||
<div role="search"> | ||
<form id="rtd-search-form" class="wy-form" action="../../../../../../search.html" method="get"> | ||
<input type="text" name="q" placeholder="Search docs" aria-label="Search docs" /> | ||
<input type="hidden" name="check_keywords" value="yes" /> | ||
<input type="hidden" name="area" value="default" /> | ||
</form> | ||
</div> | ||
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu"> | ||
<p class="caption" role="heading"><span class="caption-text">Documentation</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../../../../modules/documentation/getting_started.html">Getting Started</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../../../../modules/documentation/tutorials.html">Tutorials</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../../../../modules/documentation/roadmap.html">Roadmap</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../../../../modules/documentation/specifications.html">Coding Style Specifications</a></li> | ||
</ul> | ||
<p class="caption" role="heading"><span class="caption-text">Machop API</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../../../../modules/api/actions.html">chop.actions</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../../../../modules/api/datasets.html">chop.datasets</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../../../../modules/api/distributed.html">chop.distributed</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../../../../modules/api/ir.html">chop.ir</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../../../../modules/api/models.html">chop.models</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../../../../modules/api/nn.html">chop.nn</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../../../../modules/api/passes.html">chop.passes</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../../../../modules/api/pipelines.html">chop.pipelines</a></li> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../../../../modules/api/tools.html">chop.tools</a></li> | ||
</ul> | ||
<p class="caption" role="heading"><span class="caption-text">Mase Components</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../../../../modules/hardware/hardware_documentation.html">Hardware Documentation</a></li> | ||
</ul> | ||
<p class="caption" role="heading"><span class="caption-text">Students</span></p> | ||
<ul> | ||
<li class="toctree-l1"><a class="reference internal" href="../../../../../../modules/labs.html">Advanced Deep Learning Systems Labs</a></li> | ||
</ul> | ||
|
||
</div> | ||
</div> | ||
</nav> | ||
|
||
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" > | ||
<i data-toggle="wy-nav-top" class="fa fa-bars"></i> | ||
<a href="../../../../../../index.html">MASE</a> | ||
</nav> | ||
|
||
<div class="wy-nav-content"> | ||
<div class="rst-content"> | ||
<div role="navigation" aria-label="Page navigation"> | ||
<ul class="wy-breadcrumbs"> | ||
<li><a href="../../../../../../index.html" class="icon icon-home" aria-label="Home"></a></li> | ||
<li class="breadcrumb-item"><a href="../../../../../index.html">Module code</a></li> | ||
<li class="breadcrumb-item active">chop.passes.graph.analysis.add_metadata.add_software_metadata</li> | ||
<li class="wy-breadcrumbs-aside"> | ||
</li> | ||
</ul> | ||
<hr/> | ||
</div> | ||
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> | ||
<div itemprop="articleBody"> | ||
|
||
<h1>Source code for chop.passes.graph.analysis.add_metadata.add_software_metadata</h1><div class="highlight"><pre> | ||
<span></span><span class="kn">import</span> <span class="nn">logging</span> | ||
<span class="kn">from</span> <span class="nn">...utils</span> <span class="kn">import</span> <span class="n">get_mase_op</span><span class="p">,</span> <span class="n">get_mase_type</span> | ||
<span class="kn">from</span> <span class="nn">.software_metadata_layers</span> <span class="kn">import</span> <span class="n">SOFTWARE_PARAM_ANALYSIS_LAYERS</span> | ||
|
||
|
||
<span class="n">logger</span> <span class="o">=</span> <span class="n">logging</span><span class="o">.</span><span class="n">getLogger</span><span class="p">(</span><span class="vm">__name__</span><span class="p">)</span> | ||
|
||
|
||
<div class="viewcode-block" id="add_software_metadata_analysis_pass"> | ||
<a class="viewcode-back" href="../../../../../../modules/api/analysis/add_metadata.html#chop.passes.graph.analysis.add_metadata.add_software_metadata.add_software_metadata_analysis_pass">[docs]</a> | ||
<span class="k">def</span> <span class="nf">add_software_metadata_analysis_pass</span><span class="p">(</span><span class="n">graph</span><span class="p">,</span> <span class="n">pass_args</span><span class="o">=</span><span class="kc">None</span><span class="p">):</span> | ||
<span class="w"> </span><span class="sd">"""add software metadata</span> | ||
|
||
<span class="sd"> :param graph: a MaseGraph</span> | ||
<span class="sd"> :type graph: MaseGraph</span> | ||
|
||
<span class="sd"> :param pass_args: this pass does not need any arguments, defaults to None</span> | ||
<span class="sd"> :type pass_args: _type_, optional</span> | ||
|
||
<span class="sd"> pass_args is normally None for this pass</span> | ||
|
||
<span class="sd"> :return: return a tuple of a MaseGraph and an empty dict (no additional info to return)</span> | ||
<span class="sd"> :rtype: tuple(MaseGraph, Dict)</span> | ||
<span class="sd"> """</span> | ||
|
||
<span class="k">for</span> <span class="n">node</span> <span class="ow">in</span> <span class="n">graph</span><span class="o">.</span><span class="n">fx_graph</span><span class="o">.</span><span class="n">nodes</span><span class="p">:</span> | ||
<span class="n">mase_op</span> <span class="o">=</span> <span class="n">get_mase_op</span><span class="p">(</span><span class="n">node</span><span class="p">)</span> | ||
<span class="n">mase_type</span> <span class="o">=</span> <span class="n">get_mase_type</span><span class="p">(</span><span class="n">node</span><span class="p">)</span> | ||
|
||
<span class="k">if</span> <span class="n">mase_op</span> <span class="ow">in</span> <span class="n">SOFTWARE_PARAM_ANALYSIS_LAYERS</span><span class="p">[</span><span class="n">mase_type</span><span class="p">]:</span> | ||
<span class="n">SOFTWARE_PARAM_ANALYSIS_LAYERS</span><span class="p">[</span><span class="n">mase_type</span><span class="p">][</span><span class="n">mase_op</span><span class="p">](</span><span class="n">node</span><span class="o">.</span><span class="n">meta</span><span class="p">[</span><span class="s2">"mase"</span><span class="p">])</span> | ||
<span class="k">else</span><span class="p">:</span> | ||
<span class="n">logger</span><span class="o">.</span><span class="n">warning</span><span class="p">(</span> | ||
<span class="sa">f</span><span class="s2">"mase_type `</span><span class="si">{</span><span class="n">mase_type</span><span class="si">}</span><span class="s2">`, mase_op `</span><span class="si">{</span><span class="n">mase_op</span><span class="si">}</span><span class="s2">` not found in SOFTWARE_PARAM_ANALYSIS_LAYERS. Using default analysis layer"</span> | ||
<span class="p">)</span> | ||
<span class="n">SOFTWARE_PARAM_ANALYSIS_LAYERS</span><span class="p">[</span><span class="n">mase_type</span><span class="p">][</span><span class="s2">"default"</span><span class="p">](</span><span class="n">node</span><span class="o">.</span><span class="n">meta</span><span class="p">[</span><span class="s2">"mase"</span><span class="p">])</span> | ||
<span class="k">return</span> <span class="n">graph</span><span class="p">,</span> <span class="p">{}</span></div> | ||
|
||
</pre></div> | ||
|
||
</div> | ||
</div> | ||
<footer> | ||
|
||
<hr/> | ||
|
||
<div role="contentinfo"> | ||
<p>© Copyright 2023, DeepWok.</p> | ||
</div> | ||
|
||
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a | ||
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> | ||
provided by <a href="https://readthedocs.org">Read the Docs</a>. | ||
|
||
|
||
</footer> | ||
</div> | ||
</div> | ||
</section> | ||
</div> | ||
<script> | ||
jQuery(function () { | ||
SphinxRtdTheme.Navigation.enable(true); | ||
}); | ||
</script> | ||
|
||
</body> | ||
</html> |
Oops, something went wrong.