Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 1 addition & 26 deletions misc/test-spec.mc
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ include "map.mc"
include "set.mc"
include "common.mc"
include "tuple.mc"
include "cuda/sys.mc"

-- A path representing some file in the repository, either source or
-- generated through some command.
Expand Down Expand Up @@ -753,31 +752,7 @@ let testMain : [TestCollection] -> () = lam colls.
mexpr

testMain
[ { testColl "accelerate"
with checkCondition = lam.
if scallb [
lam. sysCommandExists "nvcc",
lam. sysCommandExists "futhark",
-- NOTE(johnwikman, 2025-03-28): Checking 0 < n_devices and that we can
-- run CUDA programs
lam. optionMapOr false (lti 0) (cudaGetDeviceCount ())
]
then ConditionsMet ()
else ConditionsImpossible ()
, exclusions = lam api.
-- NOTE(vipa, 2023-04-25): Accelerate isn't supported in
-- interpreted mode, and compiled mode is already tested via the
-- new tests below.
api.mark noTasks (api.glob ["test", "accelerate"] (IncludeSubs ()) (SuffixFile ".mc"))
, newTests = lam api.
for_ (api.glob ["test", "accelerate"] (IncludeSubs ()) (SuffixFile ".mc")) (lam mc.
let exe = api.mid {input = mc, cmd = "%m compile --accelerate %i --output %o", tag = "exe"} in
api.success {input = exe, cmd = "%i", tag = "run"};
let exe = api.mid {input = mc, cmd = "%m compile --debug-accelerate %i --output %o", tag = "debug-exe"} in
api.success {input = exe, cmd = "%i", tag = "debug-run"})
}

, { testColl "exceptions"
[ { testColl "exceptions"
with exclusions = lam api.
let runFail = {defaultTasks with interpret = Fail (), run = Fail ()} in
let interpretFail = {defaultTasks with interpret = Fail ()} in
Expand Down
275 changes: 0 additions & 275 deletions src/main/accelerate.mc

This file was deleted.

21 changes: 1 addition & 20 deletions src/main/compile.mc
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -20,7 +19,6 @@ include "ocaml/ast.mc"
include "ocaml/external-includes.mc"
include "ocaml/mcore.mc"
include "ocaml/wrap-in-try-with.mc"
include "pmexpr/demote.mc"
include "tuning/context-expansion.mc"
include "tuning/tune-file.mc"
include "jvm/compile.mc"
Expand All @@ -32,7 +30,6 @@ include "extrec/main.mc"

lang MCoreCompile =
BootParser +
PMExprDemote +
MExprHoles +
MExprCmp +
MExprSym + MExprRemoveTypeAscription + MExprTypeCheck +
Expand Down Expand Up @@ -176,21 +173,6 @@ let compile = lam files. lam options : Options. lam args.
let ast = makeKeywords ast in
endPhaseStatsExpr log "make-keywords" ast;

-- Applies static and dynamic checks on the accelerated expressions, to
-- verify that the code within them are supported by the accelerate
-- 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
endPhaseStatsExpr log "accelerate" ast;

-- Insert tuned values, or use default values if no .tune file present
let ast = insertTunedOrDefaults options ast file in
endPhaseStatsExpr log "tuning" ast;
Expand All @@ -200,5 +182,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
1 change: 0 additions & 1 deletion src/main/mi.mc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
-- File miking.mi is the main file of the Miking tool chain.

include "parser/tool.mc"
include "accelerate.mc"
include "compile.mc"
include "seq.mc"
include "string.mc"
Expand Down
Loading
Loading