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
2 changes: 1 addition & 1 deletion recipes/mojmelo/recipe.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ source:
rev: 49ee72f601beb0df51b143a4a5655c8bd515551e

build:
number: 0
number: 1
script:
- mojo precompile pixi/mojmelo/utils/mojmelo_matmul -o ${{ PREFIX }}/lib/mojo/mojmelo_matmul.mojoc
- mojo precompile pixi/mojmelo -o ${{ PREFIX }}/lib/mojo/mojmelo.mojoc
Expand Down
8 changes: 4 additions & 4 deletions recipes/mojmelo/tests/setup.mojo
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def initialize(cache_l1_size: Int, cache_l1_associativity: Int, cache_l2_size: I
possible_l2_associativities[0] = 4 if cache_l2_size <= 2097154 else 8
possible_l2_associativities[1] = possible_l2_associativities[0] * 2
possible_l2_associativities[2] = possible_l2_associativities[0] * 4
with open("./mojmelo/utils/mojmelo_matmul/params.mojo", "w") as f:
with open("./mojmelo_tmp/utils/mojmelo_matmul/params.mojo", "w") as f:
code = 'comptime L1_CACHE_SIZE = ' + String(cache_l1_size) + '\n'
code += 'comptime L1_ASSOCIATIVITY = ' + String(possible_l1_associativities[0]) + '\n'
code += 'comptime L2_CACHE_SIZE = ' + String(cache_l2_size) + '\n'
Expand All @@ -80,7 +80,7 @@ def initialize(cache_l1_size: Int, cache_l1_associativity: Int, cache_l2_size: I
code += 'comptime L2_ASSOCIATIVITY = ' + String(possible_l2_associativities[j - 1]) + '\n'
f.write(code)
else:
with open("./mojmelo/utils/mojmelo_matmul/params.mojo", "w") as f:
with open("./mojmelo_tmp/utils/mojmelo_matmul/params.mojo", "w") as f:
code = 'comptime L1_CACHE_SIZE = ' + String(cache_l1_size) + '\n'
code += 'comptime L1_ASSOCIATIVITY = ' + String(cache_l1_associativity) + '\n'
code += 'comptime L2_CACHE_SIZE = ' + String(cache_l2_size) + '\n'
Expand Down Expand Up @@ -170,7 +170,7 @@ def main() raises:
var code: String
with open("./param" + String(Int(command) + 1), "r") as f:
code = f.read()
with open("./mojmelo/utils/mojmelo_matmul/params.mojo", "w") as f:
with open("./mojmelo_tmp/utils/mojmelo_matmul/params.mojo", "w") as f:
f.write(code)
print('Setup', command + '/8', 'done!')
else:
Expand All @@ -197,7 +197,7 @@ def main() raises:
var code: String
with open("./param" + String(Counter[Int](votes).most_common(1)[0]._value + 1), "r") as f:
code = f.read()
with open("./mojmelo/utils/mojmelo_matmul/params.mojo", "w") as f:
with open("./mojmelo_tmp/utils/mojmelo_matmul/params.mojo", "w") as f:
f.write(code)

for i in range(1, 10):
Expand Down
4 changes: 2 additions & 2 deletions recipes/mojmelo/tests/setup.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

path="./.pixi/envs/default/etc/conda/test-files/mojmelo/0/tests"
path="./.pixi/envs/default/etc/conda/test-files/mojmelo/1/tests"
curr=$(pwd)
cd $path

Expand All @@ -19,4 +19,4 @@ rm -f ./setup

cd $curr

pixi run mojo precompile $path/mojmelo/utils/mojmelo_matmul -o ./.pixi/envs/default/lib/mojo/mojmelo_matmul.mojoc
pixi run mojo precompile $path/mojmelo_tmp/utils/mojmelo_matmul -o ./.pixi/envs/default/lib/mojo/mojmelo_matmul.mojoc