Skip to content

Use CudaPackage mixin for py-torch#14540

Merged
adamjstewart merged 1 commit intospack:developfrom
glennpj:py-torch
Jan 16, 2020
Merged

Use CudaPackage mixin for py-torch#14540
adamjstewart merged 1 commit intospack:developfrom
glennpj:py-torch

Conversation

@glennpj
Copy link
Copy Markdown
Contributor

@glennpj glennpj commented Jan 16, 2020

This PR adds CudaPackage in order to pick up the cuda/compiler conflicts
defined in CudaPackage.

This PR adds CudaPackage in order to pick up the cuda/compiler conflicts
defined in CudaPackage.
@glennpj glennpj requested a review from adamjstewart January 16, 2020 18:00
@adamjstewart adamjstewart merged commit 5aeab7d into spack:develop Jan 16, 2020
@glennpj
Copy link
Copy Markdown
Contributor Author

glennpj commented Jan 16, 2020

I followed what was done in other packages and added CudaPackage second.

class PyTorch(PythonPackage, CudaPackage):

However, I think that makes the base class CudaPackage. I wonder if this should be

class PyTorch(CudaPackage, PythonPackage):

instead. That would affect the following packages:

  • accfft
  • amber
  • ascent
  • bohrium
  • cp2k
  • dealii
  • ghost
  • ginkgo
  • hpx
  • lammps
  • libbeagle
  • megadock
  • opencv
  • paraview
  • qmcpack
  • relion
  • rodinia
  • sirius
  • xgboost
  • gpu-burn
  • py-tensorflow
  • vtk-h
  • vtk-m

@glennpj glennpj deleted the py-torch branch January 16, 2020 18:12
@adamjstewart
Copy link
Copy Markdown
Member

@glennpj what makes you think the base class is CudaPackage? When I run spack info py-torch it correctly says the base class is PythonPackage.

@glennpj
Copy link
Copy Markdown
Contributor Author

glennpj commented Jan 16, 2020

I am thinking of inheritance order. It probably would never matter, and I could be thinking about it incorrectly, but if we wanted to have the PythonPackage class override something defined in the CudaPackage class I think the order might need to be reversed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants