Skip to content

Commit

Permalink
feat: add a test for previously implemented logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Mangern committed Oct 4, 2024
1 parent 6c4a97e commit 3436d42
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ Stream<DynamicTest> generateBadFileTests() {

new BadFileTestCase("src/test/sdfiles/single/rankprofilefuncs.sd", 2),
new BadFileTestCase("src/test/sdfiles/single/onnxmodel.sd", 1),
new BadFileTestCase("src/test/sdfiles/single/tensorGenerate.sd", 2)
};

return Arrays.stream(tests)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
schema tensorGenerate {
document tensorGenerate {
}

rank-profile myprofile {
first-phase {
expression: tensor<float>(d0[100], d1{})(d0)
}

function func() {
expression: tensor<bfloat16>(d0[10], d1[20], d3[30])(d4) # error
}

function complicated() {
expression: tensor<float>(d0[1],d1[1],d2[2])(d2) + tensor<float>(d1[1])(d2) # also error, d2 exists in other tensor.
}
}
}

0 comments on commit 3436d42

Please sign in to comment.