This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Pin for the PyPi requirements for mlir
ClosedPublic

Authored by stella.stamenova on Jan 25 2023, 9:16 AM.

Details

Summary

This change is pinning the requirements to a specific version (or a range) depending on the requirement. A couple of considerations:

  • numpy 1.24 deprecates np.object, np.bool, np.float, np.complex, np.str, and np.int which are used heavily in onnx-mlir
  • not all versions of each package are available on every platform - to the best of my knowledge, these ranges should work on Ubuntu, CentOS and Windows

Adding a minimum and maximum version, or pinning to a specific versions where possible, helps with two major goals - security and maintainability. It gives us an opportunity to make sure that the packages being used are not part of a security attack as well as guaranteeing that they support the features that mlir depends on (see note about numpy deprecation).

Let me know if you are aware of better versions or ranges to pin to.

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald Transcript
stella.stamenova requested review of this revision.Jan 25 2023, 9:16 AM
stellaraccident accepted this revision.Jan 27 2023, 8:36 AM

Given the security situation, I am fine making this change to tighten things up. It may cause some trouble for folks in the wild if they have concerning versions and pip doesn't offer great solutions. As part of a dev setup, though, I feel that folks should be able to self serve solutions to issues of there is a problem.

This revision is now accepted and ready to land.Jan 27 2023, 8:36 AM
This revision was automatically updated to reflect the committed changes.