[Git][haskell-team/DHG_packages][master] futhark: Upgrading from 0.25.15 to 0.25.23

Kari Pahula (@kaol) gitlab at salsa.debian.org
Wed Oct 30 17:10:03 GMT 2024



Kari Pahula pushed to branch master at Debian Haskell Group / DHG_packages


Commits:
226229b4 by Kari Pahula at 2024-10-30T19:08:52+02:00
futhark: Upgrading from 0.25.15 to 0.25.23

- - - - -


13 changed files:

- p/haskell-futhark/debian/changelog
- p/haskell-futhark/debian/control
- p/haskell-futhark/debian/patches/disable-lsp
- p/haskell-futhark/debian/patches/hiprtc
- p/haskell-futhark/debian/patches/lts-zlib
- p/haskell-futhark/debian/patches/series
- − p/haskell-futhark/debian/patches/test-line-output
- + p/haskell-futhark/debian/patches/test-server-timeout
- p/haskell-futhark/debian/rules
- + p/haskell-futhark/debian/tests/control
- + p/haskell-futhark/debian/tests/hip
- + p/haskell-futhark/debian/tests/multicore
- + p/haskell-futhark/debian/tests/opencl


Changes:

=====================================
p/haskell-futhark/debian/changelog
=====================================
@@ -1,3 +1,13 @@
+haskell-futhark (0.25.23-1) unstable; urgency=medium
+
+  * New upstream package
+  * Remove patch to increase the amount of output futhark test --notty
+    made
+  * Patch futhark test to abort a test on a timeout
+  * Use autopkgtest for tests
+
+ -- Kari Pahula <kaol at debian.org>  Wed, 30 Oct 2024 17:25:16 +0200
+
 haskell-futhark (0.25.15-3) unstable; urgency=medium
 
   * Sourceful upload for GHC 9.6


=====================================
p/haskell-futhark/debian/control
=====================================
@@ -17,6 +17,8 @@ Build-Depends: debhelper (>= 10),
  libghc-aeson-prof,
  libghc-ansi-terminal-dev (>= 0.6.3.1),
  libghc-ansi-terminal-prof,
+ libghc-async-dev (>= 2.2),
+ libghc-async-prof,
  libghc-base16-bytestring-dev,
  libghc-base16-bytestring-prof,
  libghc-blaze-html-dev (>= 0.9.0.1),
@@ -41,11 +43,11 @@ Build-Depends: debhelper (>= 10),
  libghc-file-embed-prof,
  libghc-free-dev (>= 5.1.10),
  libghc-free-prof,
- libghc-futhark-data-dev (>= 1.1.0.0),
+ libghc-futhark-data-dev (>= 1.1.1.0),
  libghc-futhark-data-prof,
- libghc-futhark-manifest-dev (>= 1.4.0.0),
+ libghc-futhark-manifest-dev (>= 1.5.0.0),
  libghc-futhark-manifest-prof,
- libghc-futhark-server-dev (>= 1.2.2.1),
+ libghc-futhark-server-dev (>= 1.2.3.0),
  libghc-futhark-server-prof,
  libghc-githash-dev (>= 0.1.6.1),
  libghc-githash-prof,
@@ -89,10 +91,10 @@ Build-Depends: debhelper (>= 10),
  libghc-versions-prof,
  libghc-zlib-dev (>= 0.6.3.0),
  libghc-zlib-prof,
- hipcc [amd64 arm64 ppc64el] <!nocheck>,
 Build-Depends-Indep: ghc-doc,
  libghc-aeson-doc,
  libghc-ansi-terminal-doc,
+ libghc-async-doc,
  libghc-base16-bytestring-doc,
  libghc-blaze-html-doc,
  libghc-bmp-doc,


=====================================
p/haskell-futhark/debian/patches/disable-lsp
=====================================
@@ -18,7 +18,7 @@
        ("benchcmp", (Benchcmp.main, "Compare two benchmark results.")),
 --- a/futhark.cabal
 +++ b/futhark.cabal
-@@ -156,7 +156,6 @@
+@@ -158,7 +158,6 @@
        Futhark.CLI.Eval
        Futhark.CLI.HIP
        Futhark.CLI.Literate
@@ -26,7 +26,7 @@
        Futhark.CLI.Main
        Futhark.CLI.Misc
        Futhark.CLI.Multicore
-@@ -297,12 +296,6 @@
+@@ -299,12 +298,6 @@
        Futhark.Internalise.Monomorphise
        Futhark.Internalise.ReplaceRecords
        Futhark.Internalise.TypesValues
@@ -39,7 +39,7 @@
        Futhark.MonadFreshNames
        Futhark.Optimise.BlkRegTiling
        Futhark.Optimise.CSE
-@@ -441,10 +434,8 @@
+@@ -447,10 +440,8 @@
      , bytestring >=0.11.2
      , bytestring-to-vector >=0.3.0.1
      , bmp >=1.2.6.3
@@ -50,7 +50,7 @@
      , directory >=1.3.0.0
      , directory-tree >=0.12.1
      , dlist >=0.6.0.1
-@@ -461,8 +452,6 @@
+@@ -467,8 +458,6 @@
      , haskeline
      , language-c-quote >= 0.12
      , lens


=====================================
p/haskell-futhark/debian/patches/hiprtc
=====================================
@@ -1,6 +1,6 @@
 --- a/src/Futhark/Actions.hs
 +++ b/src/Futhark/Actions.hs
-@@ -385,7 +385,7 @@
+@@ -396,7 +396,7 @@
            jsonpath = outpath `addExtension` "json"
            extra_options =
              [ "-lamdhip64",


=====================================
p/haskell-futhark/debian/patches/lts-zlib
=====================================
@@ -1,6 +1,6 @@
 --- a/futhark.cabal
 +++ b/futhark.cabal
-@@ -470,7 +470,7 @@
+@@ -476,7 +476,7 @@
      , transformers >=0.3
      , vector >=0.12
      , versions >=6.0.0
@@ -11,7 +11,7 @@
      , prettyprinter >= 1.7
 --- a/src/Futhark/Test.hs
 +++ b/src/Futhark/Test.hs
-@@ -27,6 +27,7 @@
+@@ -26,6 +26,7 @@
  where
  
  import Codec.Compression.GZip


=====================================
p/haskell-futhark/debian/patches/series
=====================================
@@ -1,4 +1,4 @@
-test-line-output
 disable-lsp
 lts-zlib
 hiprtc
+test-server-timeout


=====================================
p/haskell-futhark/debian/patches/test-line-output deleted
=====================================
@@ -1,24 +0,0 @@
---- a/src/Futhark/CLI/Test.hs
-+++ b/src/Futhark/CLI/Test.hs
-@@ -509,6 +509,12 @@
-     running = labelstr <> (T.unwords . reverse . map (T.pack . testCaseProgram) . testStatusRun) ts
-     labelstr = "Now testing: "
- 
-+reportLine :: TestStatus -> IO ()
-+reportLine ts =
-+  case reverse . map (T.pack . testCaseProgram) . testStatusRun $ ts of
-+    [] -> pure ()
-+    xs -> T.putStrLn $ T.unwords xs
-+
- moveCursorToTableTop :: IO ()
- moveCursorToTableTop = cursorUpLine tableLines
- 
-@@ -535,7 +541,7 @@
- 
-       report
-         | fancy = reportTable
--        | otherwise = const (pure ())
-+        | otherwise = reportLine
-       clear
-         | fancy = clearFromCursorToScreenEnd
-         | otherwise = pure ()


=====================================
p/haskell-futhark/debian/patches/test-server-timeout
=====================================
@@ -0,0 +1,45 @@
+--- a/src/Futhark/CLI/Test.hs
++++ b/src/Futhark/CLI/Test.hs
+@@ -5,6 +5,7 @@
+ 
+ import Control.Applicative.Lift (Errors, Lift (..), failure, runErrors)
+ import Control.Concurrent
++import Control.Concurrent.Async
+ import Control.Exception
+ import Control.Monad
+ import Control.Monad.Except (ExceptT (..), MonadError, runExceptT, withExceptT)
+@@ -105,7 +106,14 @@
+   context prog_ctx $
+     pureTestResults $
+       liftIO $
+-        withServer (futharkServerCfg to_run to_run_args) f
++        withServer (futharkServerCfg to_run to_run_args) $ \server ->
++          race (threadDelay $ 5 * 60 * 1000000) (f server) >>= \case
++            Left _ -> do
++              abortServer server
++              -- This value won't be used since abortServer will
++              -- already cause a non-zero status for wait.
++              pure undefined
++            Right r -> pure r
+ 
+ data TestMode
+   = -- | Only type check.
+--- a/futhark.cabal
++++ b/futhark.cabal
+@@ -433,6 +433,7 @@
+       aeson >=2.0.0.0
+     , ansi-terminal >=0.6.3.1
+     , array >=0.4
++    , async >=2.2
+     , base >=4.15 && <5
+     , base16-bytestring
+     , binary >=0.8.3
+@@ -451,7 +452,7 @@
+     , filepath >=1.4.1.1
+     , free >=5.1.10
+     , futhark-data >= 1.1.1.0
+-    , futhark-server >= 1.2.2.1
++    , futhark-server >= 1.2.3.0
+     , futhark-manifest >= 1.5.0.0
+     , githash >=0.1.6.1
+     , half >= 0.3


=====================================
p/haskell-futhark/debian/rules
=====================================
@@ -13,19 +13,8 @@ build/futhark:: build-ghc-stamp
 build/futhark-doc::
 	cd docs; make html
 
-common-binary-arch::
-# TODO test other backends (CPU is always available)
-# --concurrency=1 is rather excessive but too much parallelism risks GPU OOM
-# Idea: Use a runner that checks that GPU has a reasonable amount of memory available
-ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
-	set -e\
-	; if [ -r /dev/kfd -a -x /usr/bin/hipcc ]\
-	; then cp -r tests debian\
-	;      dist-ghc/build/futhark/futhark test --backend=hip --concurrency=1 --notty debian/tests\
-	; else echo "W: /dev/kfd unreadable: no available AMD GPU, or hipcc not found"\
-	;      echo "W: tests skipped."\
-	; fi
-endif
+binary-fixup/libghc-futhark-doc::
+	rm -f debian/libghc-futhark-doc/usr/share/doc/libghc-futhark-doc/html/CHANGELOG.md.gz
 
 cleanbuilddir::
-	rm -rf debian/tests docs/_build
+	rm -rf debian/tmp-test docs/_build


=====================================
p/haskell-futhark/debian/tests/control
=====================================
@@ -0,0 +1,10 @@
+Tests: multicore
+Depends: futhark
+
+Tests: opencl
+Depends: futhark, pocl-opencl-icd, ocl-icd-opencl-dev
+
+Tests: hip
+Depends: futhark, hipcc, rocminfo
+Restrictions: skippable, needs-sudo
+Architecture: amd64 arm64 ppc64el


=====================================
p/haskell-futhark/debian/tests/hip
=====================================
@@ -0,0 +1,48 @@
+#!/bin/sh
+# Adapted from autopkgtest driver for ROCm
+
+if [ ! -e /dev/kfd ]
+then
+        echo "/dev/kfd not present, system either lacks AMD GPU or AMDGPU driver is not loaded."
+        echo "Skipping tests."
+        # Magic number to signal 'skipped'
+        exit 77
+elif [ "$(id -u)" != "0" ] && [ ! -r /dev/kfd ]
+then
+        echo "/dev/kfd present but no read permission."
+        echo "Skipping tests."
+        exit 77
+fi
+
+# First, gather system info
+sudo -n mount -t debugfs none /sys/kernel/debug || true
+if sudo -n [ -d /sys/kernel/debug/dri ]
+then
+        for index in $(sudo -n ls /sys/kernel/debug/dri)
+        do
+                info="/sys/kernel/debug/dri/$index/amdgpu_firmware_info"
+                if sudo -n [ -f "$info" ]
+                then
+                        # shellcheck disable=SC2024   # we don't need privileged write
+                        sudo -n cat "$info" > "$AUTOPKGTEST_ARTIFACTS/amdgpu_firmware_info.$index"
+                fi
+        done
+else
+        echo "Could not read /sys/kernel/debug/dri" >> "$AUTOPKGTEST_ARTIFACTS/firmware.err"
+fi
+# shellcheck disable=SC2024   # we don't need privileged write
+sudo -n dmesg > "$AUTOPKGTEST_ARTIFACTS/dmesg.before" || true
+# shellcheck disable=SC2024   # we don't need privileged write
+sudo rocminfo > "$AUTOPKGTEST_ARTIFACTS/rocminfo.txt" || true
+
+# Any individual failure is overall failure
+EXITCODE=0
+cp -r tests $AUTOPKGTEST_TMP
+
+futhark test --backend=hip --notty $AUTOPKGTEST_TMP/tests || EXITCODE=1
+
+# Tests might have generated new messages
+# shellcheck disable=SC2024   # we don't need privileged write
+sudo -n dmesg > "$AUTOPKGTEST_ARTIFACTS/dmesg.after" || true
+
+exit $EXITCODE


=====================================
p/haskell-futhark/debian/tests/multicore
=====================================
@@ -0,0 +1,4 @@
+#! /bin/sh
+
+cp -r tests $AUTOPKGTEST_TMP
+futhark test --backend=multicore --notty $AUTOPKGTEST_TMP/tests


=====================================
p/haskell-futhark/debian/tests/opencl
=====================================
@@ -0,0 +1,4 @@
+#! /bin/sh
+
+cp -r tests $AUTOPKGTEST_TMP
+futhark test --backend=opencl --notty $AUTOPKGTEST_TMP/tests



View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/226229b4fd1c982115c7552c542d670d1b9a48a1

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/226229b4fd1c982115c7552c542d670d1b9a48a1
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20241030/99fcbb18/attachment-0001.htm>


More information about the Pkg-haskell-commits mailing list