Skip to content

Commit

Permalink
Comment out registration of irPassLLVMIRAutoQuantization pass (#658)
Browse files Browse the repository at this point in the history
* Comment out registration of AutoQuantization pass
* Add error message for trying to use AutoQuantization pass

Addresses #657.
  • Loading branch information
KomaGR authored Jul 16, 2024
1 parent 39e7e0c commit 2286829
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
21 changes: 13 additions & 8 deletions src/newton/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ main(int argc, char *argv[])
{"latex", no_argument, 0, 'x'},
{"RTLcodegen", required_argument, 0, 'l'},
{"targetParam", required_argument, 0, 'T'},
{"llvm-ir", required_argument, 0, 'I'},
{"llvm-ir-liveness-check", no_argument, 0, 'L'},
{"llvm-ir-auto-quantization", no_argument, 0, 'Q'},
{"llvm-ir", required_argument, 0, 'I'},
{"llvm-ir-liveness-check", no_argument, 0, 'L'},
{"llvm-ir-auto-quantization", no_argument, 0, 'Q'},
{"estimator-synthesis", required_argument, 0, 420},
{"process", required_argument, 0, 421},
{"measurement", required_argument, 0, 422},
Expand Down Expand Up @@ -424,11 +424,16 @@ main(int argc, char *argv[])
break;
}

case 'Q':
{
N->irPasses |= kNewtonirPassLLVMIRAutoQuantization;
break;
}
case 'Q':
{
N->irPasses |= kNewtonirPassLLVMIRAutoQuantization;

flexprint(N->Fe, N->Fm, N->Fperr, "AutoQuantization pass was disabled at compilation.\n");
consolePrintBuffers(N);
exit(EXIT_FAILURE);

break;
}

case 494:
{
Expand Down
13 changes: 9 additions & 4 deletions src/newton/newton.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,15 @@ processNewtonFile(State * N, char * filename)
{
irPassLLVMIROptimizeByRange(N);
}
if (N->irPasses & kNewtonirPassLLVMIRAutoQuantization)
{
irPassLLVMIRAutoQuantization(N);
}
if (N->irPasses & kNewtonirPassLLVMIRAutoQuantization)
{
/*
* irPassLLVMIRAutoQuantization pass is causing issues with the current implementation.
*/
// irPassLLVMIRAutoQuantization(N);
flexprint(N->Fe, N->Fm, N->Fperr, "AutoQuantization pass was disabled at compilation.\n");
}

/*
* Dot backend.
*/
Expand Down

0 comments on commit 2286829

Please sign in to comment.