Skip to main content
3m
DotMR Media Network
Back to Top Stories

PyTorch Enhances MetalExprPrinter with New FloatPow Functionality

dotmr — Truth. Verified. Reported.
Rohan DeshmukhVerified Journalist
Technology & Digital Infrastructure Editor•Published •3 min read
Share verified article
Editorial news photograph illustrating PyTorch Enhances MetalExprPrinter with New FloatPow Functionality (technology coverage)
IMPORTANT REPORT
Editorial news photograph illustrating PyTorch Enhances MetalExprPrinter with New FloatPow Functionality (technology coverage)DotMR News Wire
4

Executive Summary & Key Takeaways

KEY HIGHLIGHTS
  1. 101

    PyTorch's update introduces print FloatPow to MetalExprPrinter, fixing critical errors.

  2. 202

    The new function enhances dynamic shape handling, improving performance on MPS.

  3. 303

    A regression test was added to prevent future issues related to floating-point powers.

  4. 404

    The update is expected to benefit developers using Adam-style bias correction in models.

The recent update to PyTorch has introduced a critical enhancement to the MetalExprPrinter by adding the `_print_FloatPow` function. This addition is particularly significant for developers working with dynamic shapes in machine learning models, as it resolves a previously encountered `NotImplementedError` that disrupted the functionality of Adam-style bias correction in the Metal Performance Shaders (MPS).

Understanding the MetalExprPrinter Update

The MetalExprPrinter is a component of PyTorch that translates expressions into Metal, Apple's graphics and compute API. The lack of a `_print_FloatPow` function meant that expressions involving floating-point powers were not handled correctly, leading to errors during code generation. Specifically, expressions like `0.95 ** x.shape[0]` were lowered to `ops.index_expr(FloatPow(0.95, ToFloat(s77)))`, but without the appropriate printer function, the code would fall back to a base printer that could not process these expressions, resulting in a `NotImplementedError`.

This issue was particularly problematic when using the `torch.compile(dynamic=True)` feature, which is designed to optimize model performance by compiling dynamic shapes. The failure to handle floating-point powers effectively limited the capabilities of developers using MPS for their machine learning applications.

The Fix: Implementing _print_FloatPow

The new `_print_FloatPow` function has been aliased to `_print_PowByNatural`, which already casts both operands to float and emits `metal::precise::pow`. This mirrors the functionality found in C++'s `std::pow` and Triton's `libdevice.pow`, ensuring consistency across different platforms and improving the overall reliability of the MetalExprPrinter.

In addition to the implementation of `_print_FloatPow`, a regression test named `test_float_pow_symint_exponent` has been added. This test reproduces the issue that led to the original error, ensuring that future updates do not reintroduce the same problem. The inclusion of this test demonstrates a commitment to maintaining the integrity of the codebase and improving the user experience for developers.

Impact on Developers and Machine Learning Models

The addition of `_print_FloatPow` is expected to have a significant impact on developers utilizing PyTorch for machine learning tasks, particularly those focused on dynamic shapes. The ability to correctly handle floating-point powers will enhance the performance of models that rely on Adam-style bias correction, which is a common technique in training deep learning models.

With this update, developers can expect smoother operations when compiling their models for MPS, leading to faster execution times and more reliable results. This enhancement not only improves the functionality of existing models but also opens the door for more complex model architectures that leverage dynamic shapes.

Community Response and Future Developments

The PyTorch community has responded positively to this update, recognizing the importance of addressing such critical issues. The collaborative effort in developing this feature, including contributions from AI assistants like Claude Code, highlights the innovative approaches being taken within the community to enhance the framework.

As PyTorch continues to evolve, further enhancements to the MetalExprPrinter and other components are anticipated. Developers are encouraged to stay engaged with the community and contribute to ongoing discussions about potential improvements and feature requests.

Looking ahead,, the addition of `_print_FloatPow` to the MetalExprPrinter marks a significant step forward for PyTorch, enhancing its capabilities for dynamic shape handling and improving the overall performance of machine learning models on MPS. This update not only resolves existing issues but also sets the stage for future advancements in the framework, ensuring that PyTorch remains a leading choice for developers in the machine learning space.

Advertisement

DotMR Compliant Ad Placement (article_mid_content)

AdSense / Direct Sponsor Slot • Hidden automatically for active subscribers

dotmr — Truth. Verified. Reported.
Rohan DeshmukhDotMR Beat Correspondent

Technology & Digital Infrastructure Editor • Technology & Innovation Desk

Rohan Deshmukh covers India's technology ecosystem, semiconductor manufacturing, enterprise software, telecommunications, and digital public infrastructure.

Open Contributor Program₹1,500 Fee100% FREE (₹0)

Are you a Founder, Industry Analyst, or Domain Expert? Publish on DotMR for Free

Submit your startup story, sector analysis, or official press release. Verified contributors receive a full 1,000+ word editorial feature, author attribution, and instant Google News indexing at zero cost.

Submit Guest Column / Press Release →
Cite / Quote This Article

Rohan Deshmukh (2026). “PyTorch Enhances MetalExprPrinter with New FloatPow Functionality”. DotMR Verified Coverage. https://dotmr.com/pytorch-enhances-metalexprprinter-with-new-floatpow-functionality

DotMR Executive WireDaily Digest

Get Verified Market & Policy Briefings on WhatsApp

Join over 42,000+ investors, founders, and policy leaders who read our 1-minute daily morning briefing. Direct regulatory facts, zero sensationalism, zero spam.

1 Morning Wire (8:30 AM IST)Direct Primary FilingsFree Forever
Join WhatsApp Channel1-tap join • No phone number shared
Regional Coverage

More in Artificial Intelligence

Latest reports and ground dispatches from Artificial Intelligence

Explore All→

More in Technology & AI

View All Technology & AI →
DotMR Media Network

DotMR Media Network is an independent digital news publication delivering breaking India news, business and markets analysis, technology, policy, sports, and global coverage. Beyond Headlines. Beyond Boundaries.

DotMR Newsroom • New Delhi Bureau
Official Channels
Editorial Bureau: Barakhamba Road, Connaught Place, New Delhi 110001, India

Newsroom & Submissions

Opinion & ReleasesFREE (₹0)

Submit op-ed columns, corporate announcements, or industry commentary to our editorial desk for expedited review.

Submit Free Contribution
  • Senior desk editorial review
  • Copyediting & standards compliance
  • Clear contributor attribution

Editorial & Financial Disclosure: DotMR Media Network adheres to strict journalistic accuracy and primary-source reporting standards. News coverage, market analysis, corporate filings, and public health reports are published for informational purposes only and do not constitute legal, tax, medical, or investment advice.

To report a factual error or request a clarification, please visit our Corrections Policy or contact our Editorial Desk.

© 2026 DotMR Media Network (dotmr.com). All rights reserved.

Beyond Headlines. Beyond Boundaries.

DotMR™ (dotmr.com) is an independent digital news platform launched in 2026. Acquired as a newly registered media entity in 2026, DotMR maintains zero affiliation, succession, or continuity with any previous registrants, foreign operators, or websites prior to 2026.