• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ponder-lab / Hybridize-Functions-Refactoring / #2366
83%

Build:
DEFAULT BRANCH: main
Ran 07 Jul 2026 04:31PM UTC
Jobs 1
Files 32
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

07 Jul 2026 04:21PM UTC coverage: 80.045% (+0.5%) from 79.588%
#2366

push

github

web-flow
Add benefit preconditions for barren functions (#712)

* Add a benefit precondition for barren eager functions (#709)

A function can satisfy the hybridization preconditions—it carries a
tensor parameter and hybridizing it is semantics-preserving—yet perform
no tensor computation, so graph execution yields no benefit (e.g. a
parameter packed only into `tf.train.*` proto builders). Hybridizing
such a function is pure retracing overhead.

Add `PreconditionFailure.NO_TENSOR_COMPUTATION`, computed by
`Function.computeTensorComputation` via `Util.performsTensorFlowOp`. The
detector is a union, transitive over user-defined callees: a body
instruction counts as a tensor op when it either (a) defines a value the
tensor-type analysis types as a tensor (covering operators, layer calls,
and modeled ops, while excluding proto and spec builders), or (b)
invokes a `tensorflow.*` op recovered from the IR (covering ops the
tensor-type analysis does not model). Callee names are resolved from the
`PythonInvokeInstruction` operand, so unmodeled ops need no call-graph
node.

Modeled as a `PreconditionFailure` on the eager-to-hybrid direction
only: declining to hybridize a barren function is incompleteness-safe
and never violates semantics preservation. When the function has no
call-graph node the result is left undetermined (`null`) and the
precondition does not block. The hybrid-to-eager (de-hybridization)
direction is deferred.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FuhM8SsTRB6BraLt3Ph7ZC

* Address Copilot review on #712

- Skip TensorFlow library nodes when recursing over callees: their ops
  are detected at the call site, so descending into their internal IR is
  wasteful and could misattribute their computation to the caller.
- Compute the tensor-typed pointer-key set once per project and pass it
  in, rather than re-deriving it from the `TensorTypeAnalysis` for every
  function.
- Comp... (continued)

119 of 129 new or added lines in 5 files covered. (92.25%)

1789 of 2235 relevant lines covered (80.04%)

0.8 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
94.22
-0.26% edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Function.java
4
85.34
3.66% edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/analysis/Util.java
2
70.65
0.24% edu.cuny.hunter.hybridize.core/src/edu/cuny/hunter/hybridize/core/refactorings/HybridizeFunctionRefactoringProcessor.java
Jobs
ID Job ID Ran Files Coverage
1 #2366.1 07 Jul 2026 04:31PM UTC 32
80.04
Source Files on build #2366
  • Tree
  • List 32
  • Changed 5
  • Source Changed 5
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 7e7dae2a on github
  • Prev Build on main
  • Next Build on main
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc