8000 Adjust CMake code for Eigen by cyyever · Pull Request #148628 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Adjust CMake code for Eigen #148628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

cyyever
Copy link
Collaborator
@cyyever cyyever commented Mar 6, 2025

There are some CMake changes introduced:

  1. CAFFE2_USE_EIGEN_FOR_BLAS is removed because it is used in the removed Caffe2 code.
  2. Link to Eigen only when BLAS value is EIGEN.

Copy link
pytorch-bot bot commented Mar 6, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/148628

Note: Links to docs will display an error until the docs builds have been completed.

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit ab45fdc with merge base 3d777ba (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@cyyever
Copy link
Collaborator Author
cyyever commented Mar 6, 2025

@pytorchbot label "topic: not user facing"

@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Mar 6, 2025
@colesbury colesbury added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Mar 6, 2025
@BwL1289
Copy link
BwL1289 commented Apr 30, 2025

@cyyever not sure if this PR is where we want to do this, but w/ how it's currently written, eigen is built unconditionally.

Since it's not used if it's not a BLAS backend, building Eigen should probably be moved under this line.

Let me know how I can help.

@cyyever
Copy link
Collaborator Author
cyyever commented Apr 30, 2025

@BwL1289 If Eigen is still interested, we should update the module. To be honest, Eigen doesn't have a formal realise for several years.. Nevertheless, the macro is not used..

@BwL1289
Copy link
BwL1289 commented Apr 30, 2025

@cyyever agreed. It's still maintained and used in python libs like ml_dtypes but not as popular as it was.

If you want to give me access to push to this PR I'll move it so its built conditionally. Would like to avoid polluting my container with eigen (that I don't use anywhere else).

@cyyever
Copy link
Collaborator Author
cyyever commented Apr 30, 2025

@BwL1289 Do what you want, feel free to fork or change it.

@BwL1289
8000 Copy link
BwL1289 commented Apr 30, 2025

@cyyever thanks. I'll need access to push to your branch.

@cyyever cyyever requested a review from zou3519 May 1, 2025 02:53
@cyyever
Copy link
Collaborator Author
cyyever commented May 1, 2025

@zou3519 Have a look?

@cyyever cyyever force-pushed the CAFFE2_USE_EIGEN_FOR_BLAS branch from daa7d31 to 128c944 Compare May 1, 2025 03:20
@cyyever cyyever changed the title Remove CAFFE2_USE_EIGEN_FOR_BLAS Adjust CMake code for Eigen May 1, 2025
@cyyever cyyever requested a review from malfet May 1, 2025 03:54
@BwL1289
Copy link
BwL1289 commented May 2, 2025

Looks like this breaks on xla:

CMake Error at caffe2/CMakeLists.txt:1489 (target_link_libraries):
  Target "torch_cpu" links to:

    BLAS::BLAS

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

@cyyever cyyever force-pushed the CAFFE2_USE_EIGEN_FOR_BLAS branch from 128c944 to 1cd94de Compare May 3, 2025 00:34
@cyyever cyyever force-pushed the CAFFE2_USE_EIGEN_FOR_BLAS branch from 1cd94de to ab45fdc Compare May 3, 2025 00:35
@janeyx99 janeyx99 removed their request for review May 5, 2025 14:27
@zou3519
Copy link
Contributor
zou3519 commented May 6, 2025

The caffe2 changes make sense to me, but I don't know enough about the build system to talk about eigen, so I am deferring to Nikita.

@zou3519 zou3519 removed their request for review May 6, 2025 02:47
@BwL1289
Copy link
BwL1289 commented May 6, 2025

Let me know if/how I can help.

@cyyever
Copy link
Collaborator Author
cyyever commented May 6, 2025

Approval

@BwL1289
Copy link
BwL1289 commented May 7, 2025

Not sure if you're asking for sign off on Eigen build from me... but if so, LGTM.

@cyyever cyyever requested a review from Skylion007 May 7, 2025 14:23
@BwL1289
Copy link
BwL1289 commented May 14, 2025

Bumping

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open source topic: not user facing topic category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0