!eWOErHSaiddIbsUNsJ:nixos.org

NixOS CUDA

314 Members
CUDA packages maintenance and support in nixpkgs | https://github.com/orgs/NixOS/projects/27/ | https://nixos.org/manual/nixpkgs/unstable/#cuda61 Servers

Load older messages


SenderMessageTime
23 May 2024
@connorbaker:matrix.orgconnor (he/him) Updated https://gist.github.com/ConnorBaker/305b1aebd7ee74a258a616bbbd4dcd7b with a list of packages which use requireFile if that's helpful to anyone 13:36:53
@connorbaker:matrix.orgconnor (he/him)

Gaétan Lepage: if you get a chance, could you patch python312Packages.qgrid? It needs distutils when building with python3.12 or later:

python3.12-qgrid> ModuleNotFoundError: No module named 'distutils'
14:28:27
@glepage:matrix.orgGaétan Lepage
In reply to @connorbaker:matrix.org

Gaétan Lepage: if you get a chance, could you patch python312Packages.qgrid? It needs distutils when building with python3.12 or later:

python3.12-qgrid> ModuleNotFoundError: No module named 'distutils'
Sure ! Done: https://github.com/NixOS/nixpkgs/pull/314010
14:43:58
@connorbaker:matrix.orgconnor (he/him)

Would you mind also patching https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/svgelements/default.nix?

Maybe like the API for the tests changed (extra s)?

python3.12-svgelements> =================================== FAILURES ===================================
python3.12-svgelements> ___________ TestElementCubicBezierPoint.test_cubic_bounds_issue_220 ____________
python3.12-svgelements> [gw27] linux -- Python 3.12.3 /nix/store/c7ycrgwv039nqglbif98yggx211sdbcl-python3-3.12.3/bin/python3.12
python3.12-svgelements> self = <test.test_cubic_bezier.TestElementCubicBezierPoint testMethod=test_cubic_bounds_issue_220>
python3.12-svgelements>     def test_cubic_bounds_issue_220(self):
python3.12-svgelements>         p = Path(transform=Matrix(682.657124793113, 0.000000000003, -0.000000000003, 682.657124793113, 257913.248909660178, -507946.354527872754))
python3.12-svgelements>         p += CubicBezier(start=Point(-117.139521365,1480.99923469), control1=Point(-41.342266634,1505.62725567), control2=Point(40.3422666342,1505.62725567), end=Point(116.139521365,1480.99923469))
python3.12-svgelements>         bounds = p.bbox()
python3.12-svgelements> >       self.assertNotAlmostEquals(bounds[1], bounds[3], delta=100)
python3.12-svgelements> E       AttributeError: 'TestElementCubicBezierPoint' object has no attribute 'assertNotAlmostEquals'. Did you mean: 'assertNotAlmostEqual'?
python3.12-svgelements> test/test_cubic_bezier.py:82: AttributeError
python3.12-svgelements> ______________________ TestElementWrite.test_write_group _______________________
python3.12-svgelements> [gw20] linux -- Python 3.12.3 /nix/store/c7ycrgwv039nqglbif98yggx211sdbcl-python3-3.12.3/bin/python3.12
python3.12-svgelements> self = <test.test_write.TestElementWrite testMethod=test_write_group>
python3.12-svgelements>     def test_write_group(self):
python3.12-svgelements>         g = Group()
python3.12-svgelements> >       self.assertEquals(g.string_xml(), "<g />")
python3.12-svgelements> E       AttributeError: 'TestElementWrite' object has no attribute 'assertEquals'. Did you mean: 'assertEqual'?
python3.12-svgelements> test/test_write.py:27: AttributeError
14:49:59
@connorbaker:matrix.orgconnor (he/him)Oh there's a patch for it! https://github.com/meerk40t/svgelements/commit/23da98941a94cf1afed39c10750222ccfee73c9f14:50:30
@glepage:matrix.orgGaétan Lepage
In reply to @connorbaker:matrix.org
Oh there's a patch for it! https://github.com/meerk40t/svgelements/commit/23da98941a94cf1afed39c10750222ccfee73c9f
https://github.com/NixOS/nixpkgs/pull/314018
14:57:46
@connorbaker:matrix.orgconnor (he/him)

Can you also take a look at https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/gpuctypes/default.nix?

When I build it with cudaSupport = true it tries to run tests and fails (note that I've not set testCudaRuntime to true):

python3.12-gpuctypes> ERROR test/test_cuda.py::TestCUDADevice::test_device_count - RecursionError: maximum recursion depth exceeded
python3.12-gpuctypes> ERROR test/test_cuda.py::TestCUDADevice::test_malloc - RecursionError: maximum recursion depth exceeded
15:21:03
@connorbaker:matrix.orgconnor (he/him) Maybe related -- looks like pytest's -k option can't be specified multiple times? I'm seeing behavior where the last value I provide for it is the one it uses 16:02:45
@connorbaker:matrix.orgconnor (he/him)

I would suggest

  pytestFlagsArray =
    [ "-v" ]
    ++ lib.optionals (!testCudaRuntime) [ "--deselect=test/test_cuda.py::TestCUDADevice" ]
    ++ lib.optionals (!testRocmRuntime) [ "--deselect=test/test_hip.py::TestHIPDevice" ];
16:05:19
@connorbaker:matrix.orgconnor (he/him)(Deselect can be specified multiple times: https://docs.pytest.org/en/latest/example/pythoncollection.html#deselect-tests-during-test-collection)16:05:44
@hexa:lossy.networkhexahm, can we get rid of these deprecations in 24.05?16:23:37
@hexa:lossy.networkhexa
trace: warning: cudaPackages.autoAddDriverRunpath is deprecated, use pkgs.autoAddDriverRunpath instead
trace: warning: cudaPackages.autoAddDriverRunpath is deprecated, use pkgs.autoAddDriverRunpath instead
trace: warning: cudaPackages.autoFixElfFiles is deprecated, use pkgs.autoFixElfFiles instead
trace: warning: cudaPackages.autoAddOpenGLRunpathHook is deprecated, use pkgs.autoAddDriverRunpath instead
trace: warning: cudaPackages.autoAddDriverRunpath is deprecated, use pkgs.autoAddDriverRunpath instead
16:23:39
@hexa:lossy.networkhexathey're not really actionable to the user16:24:05
@connorbaker:matrix.orgconnor (he/him)Where are they coming from?16:29:52
@hexa:lossy.networkhexagood question, let me check my nvidia bits in the config18:11:37
@hexa:lossy.networkhexa
{ pkgs
, ...
}:

{
  nixpkgs.config.cudaSupport = true;

  hardware.opengl = {
    enable = true;
  };

  services.xserver.videoDrivers = [
    "nvidia"
  ];

  environment.systemPackages = with pkgs; [
    cudatoolkit
    nvtopPackages.nvidia
  ];
}
18:19:51
@hexa:lossy.networkhexaso, nothing speical18:19:54
@hexa:lossy.networkhexatried the two packages, no trace18:20:00
@glepage:matrix.orgGaétan Lepage
In reply to @hexa:lossy.network
trace: warning: cudaPackages.autoAddDriverRunpath is deprecated, use pkgs.autoAddDriverRunpath instead
trace: warning: cudaPackages.autoAddDriverRunpath is deprecated, use pkgs.autoAddDriverRunpath instead
trace: warning: cudaPackages.autoFixElfFiles is deprecated, use pkgs.autoFixElfFiles instead
trace: warning: cudaPackages.autoAddOpenGLRunpathHook is deprecated, use pkgs.autoAddDriverRunpath instead
trace: warning: cudaPackages.autoAddDriverRunpath is deprecated, use pkgs.autoAddDriverRunpath instead
I also have those
22:07:01
@hexa:lossy.networkhexa So what is the overlap between our configs? 22:07:47
@glepage:matrix.orgGaétan Lepage I basically have the same config as you have hexa (UTC+1) 22:18:24
@glepage:matrix.orgGaétan LepageI guess that the origins of those warnings are internal to nixpkgs.22:18:40
@hexa:lossy.networkhexaok, it is nothing in this file 😄 22:41:19
@hexa:lossy.networkhexakilling nixpkgs.config.cudaSupport gets rid of the trace22:41:59
@hexa:lossy.networkhexaok, this one is sus23:03:45
@hexa:lossy.networkhexa

trace: warning: cudaPackages.autoAddOpenGLRunpathHook is deprecated, use pkgs.autoAddDriverRunpath instead

23:03:51
@hexa:lossy.networkhexa
Already up to date.
❯ rg autoAddOpenGLRunpathHook
nixos/doc/manual/release-notes/rl-2405.section.md
248:- `cudaPackages.autoAddOpenGLRunpathHook` and `cudaPackages.autoAddDriverRunpath` have been deprecated for `pkgs.autoAddDriverRunpath`. Functionality has not changed, but the setuphook has been renamed and moved to the top-level package scope.

pkgs/development/cuda-modules/aliases.nix
15:  autoAddOpenGLRunpathHook =
16:    mkRenamed "autoAddOpenGLRunpathHook" "pkgs.autoAddDriverRunpath"
23:04:40
@hexa:lossy.networkhexa *
❯ rg autoAddOpenGLRunpathHook
nixos/doc/manual/release-notes/rl-2405.section.md
248:- `cudaPackages.autoAddOpenGLRunpathHook` and `cudaPackages.autoAddDriverRunpath` have been deprecated for `pkgs.autoAddDriverRunpath`. Functionality has not changed, but the setuphook has been renamed and moved to the top-level package scope.

pkgs/development/cuda-modules/aliases.nix
15:  autoAddOpenGLRunpathHook =
16:    mkRenamed "autoAddOpenGLRunpathHook" "pkgs.autoAddDriverRunpath"
23:04:44
@hexa:lossy.networkhexathe only two mentions23:04:49
@hexa:lossy.networkhexalet's rule out the release notes for a second 😄 23:04:55

Show newer messages


Back to Room ListRoom Version: 9