unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 74efb4fd4dce92fab9b89b8e17920a58b33f36d0 3790 bytes (raw)
name: gnu/packages/patches/miking-drop-acceleration.patch 	 # note: path name is non-authoritative(*)

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
 
From c04bae74e04a19c3bcbfa2e767a882227f7d0a98 Mon Sep 17 00:00:00 2001
From: Liliana Marie Prikler <liliana.prikler@ist.tugraz.at>
Date: Fri, 16 Jun 2023 14:10:54 +0200
Subject: [PATCH] main: Drop acceleration support.

This still leaves all the acceleration-specific code in stdlib, but breaks
the dependencies, allowing users to simply delete the files.
---
 src/main/compile.mc        | 13 ++-----------
 src/main/mi.mc             |  1 -
 src/main/options-config.mc |  6 ------
 src/main/options-type.mc   |  1 -
 src/main/options.mc        |  1 -
 5 files changed, 2 insertions(+), 20 deletions(-)

diff --git a/src/main/compile.mc b/src/main/compile.mc
index bf8a4d6..63f8e49 100644
--- a/src/main/compile.mc
+++ b/src/main/compile.mc
@@ -1,7 +1,6 @@
 -- Miking is licensed under the MIT license.
 -- Copyright (C) David Broman. See file LICENSE.txt
 
-include "accelerate.mc"
 include "mi-lite.mc"
 include "options.mc"
 include "parse.mc"
@@ -130,14 +129,7 @@ let compile = lam files. lam options : Options. lam args.
     -- backends.
     -- TODO(larshum, 2022-06-29): Rewrite compilation so that we don't
     -- duplicate symbolization and type-checking when compiling in debug mode.
-    let ast =
-      if options.debugAccelerate then
-        let ast = symbolizeExpr keywordsSymEnv ast in
-        let ast = typeCheck ast in
-        let ast = removeTypeAscription ast in
-        match checkWellFormedness options ast with (ast, _, _) in
-        demoteParallel ast
-      else demoteParallel ast in
+    let ast = demoteParallel ast in
     endPhaseStats log "accelerate" ast;
 
     -- Insert tuned values, or use default values if no .tune file present
@@ -149,5 +141,4 @@ let compile = lam files. lam options : Options. lam args.
 
     compileWithUtests options file ast; ()
   in
-  if options.accelerate then compileAccelerate files options args
-  else iter compileFile files
+  iter compileFile files
diff --git a/src/main/mi.mc b/src/main/mi.mc
index df52d1f..fb78f69 100644
--- a/src/main/mi.mc
+++ b/src/main/mi.mc
@@ -3,7 +3,6 @@
 --
 -- File miking.mi is the main file of the Miking tool chain.
 
-include "accelerate.mc"
 include "compile.mc"
 include "seq.mc"
 include "string.mc"
diff --git a/src/main/options-config.mc b/src/main/options-config.mc
index 2284e59..33dd22b 100644
--- a/src/main/options-config.mc
+++ b/src/main/options-config.mc
@@ -77,12 +77,6 @@ let optionsConfig : ParseConfig Options = [
     lam p: ArgPart Options.
       let o: Options = p.options in
       {o with accelerateTensorMaxRank = string2int (argToString p)}),
-  ([("--debug-accelerate", "", "")],
-    join ["Enables static and dynamic checks for accelerated expressions, ",
-          "and runs the program on the CPU."],
-    lam p: ArgPart Options.
-      let o: Options = p.options in {o with debugAccelerate = true,
-                                            runtimeChecks = true}),
   ([("--cpu-only", "", "")],
     "Translate accelerated code to multicore CPU code",
     lam p: ArgPart Options.
diff --git a/src/main/options-type.mc b/src/main/options-type.mc
index 52e6fcb..d27a919 100644
--- a/src/main/options-type.mc
+++ b/src/main/options-type.mc
@@ -20,7 +20,6 @@ type Options = {
   compileAfterTune : Bool,
   accelerate : Bool,
   accelerateTensorMaxRank : Int,
-  debugAccelerate : Bool,
   cpuOnly : Bool,
   use32BitIntegers : Bool,
   use32BitFloats : Bool,
diff --git a/src/main/options.mc b/src/main/options.mc
index b870e47..246c03d 100644
--- a/src/main/options.mc
+++ b/src/main/options.mc
@@ -23,7 +23,6 @@ let optionsDefault : Options = {
   compileAfterTune = false,
   accelerate = false,
   accelerateTensorMaxRank = 3,
-  debugAccelerate = false,
   cpuOnly = false,
   use32BitIntegers = false,
   use32BitFloats = false,
-- 
2.40.1


debug log:

solving 74efb4fd4d ...
found 74efb4fd4d in https://yhetil.org/guix-patches/2e4aa0048428b0d2b08c46b03d8f21b54623e580.1687022754.git.liliana.prikler@gmail.com/

applying [1/1] https://yhetil.org/guix-patches/2e4aa0048428b0d2b08c46b03d8f21b54623e580.1687022754.git.liliana.prikler@gmail.com/
diff --git a/gnu/packages/patches/miking-drop-acceleration.patch b/gnu/packages/patches/miking-drop-acceleration.patch
new file mode 100644
index 0000000000..74efb4fd4d

1:29: trailing whitespace.
 
1:48: trailing whitespace.
 
1:51: trailing whitespace.
 
1:64: trailing whitespace.
 
1:110: trailing whitespace.
-- 
Checking patch gnu/packages/patches/miking-drop-acceleration.patch...
Applied patch gnu/packages/patches/miking-drop-acceleration.patch cleanly.
warning: squelched 1 whitespace error
warning: 6 lines add whitespace errors.

index at:
100644 74efb4fd4dce92fab9b89b8e17920a58b33f36d0	gnu/packages/patches/miking-drop-acceleration.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).