mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-09 12:15:09 -05:00
fix(compiler): Take care of program with no input when creating client parameters
This commit is contained in:
committed by
Quentin Bourgerie
parent
1f3944047f
commit
3330b2f855
@@ -143,9 +143,14 @@ createClientParametersForV0(V0FHEContext fheContext,
|
||||
|
||||
// Create input and output circuit gate parameters
|
||||
auto funcType = (*funcOp).getType();
|
||||
bool hasContext = funcType.getInputs()
|
||||
.back()
|
||||
.isa<mlir::concretelang::Concrete::ContextType>();
|
||||
|
||||
auto inputs = funcType.getInputs();
|
||||
|
||||
bool hasContext =
|
||||
inputs.empty()
|
||||
? false
|
||||
: inputs.back().isa<mlir::concretelang::Concrete::ContextType>();
|
||||
|
||||
for (auto inType = funcType.getInputs().begin();
|
||||
inType < funcType.getInputs().end() - hasContext; inType++) {
|
||||
auto gate =
|
||||
|
||||
Reference in New Issue
Block a user