Skip to content
Snippets Groups Projects
Commit 3bc5f65d authored by kotsifa2's avatar kotsifa2
Browse files

Promise backend works with expected promise simulator call signatures

parent fc45b99d
No related branches found
No related tags found
No related merge requests found
......@@ -118,6 +118,7 @@ class InitialState : public AbstractState {
public:
InitialState() {
StateID = ID::INITIAL_STATE;
DEBUG(errs() << "new InitialState\n");
}
~InitialState() {}
......@@ -128,6 +129,7 @@ class FullyConnectedLayer_1 : public AbstractState {
public:
FullyConnectedLayer_1() {
StateID = ID::FULLY_CONNECTED_LAYER_1;
DEBUG(errs() << "new FullyConnectedLayer_1\n");
}
~FullyConnectedLayer_1() {}
......@@ -138,6 +140,7 @@ class FullyConnectedLayer_2 : public AbstractState {
public:
FullyConnectedLayer_2() {
StateID = ID::FULLY_CONNECTED_LAYER_2;
DEBUG(errs() << "new FullyConnectedLayer_2\n");
}
~FullyConnectedLayer_2() {}
......@@ -148,6 +151,7 @@ class FullyConnectedLayer_3 : public AbstractState {
public:
FullyConnectedLayer_3() {
StateID = ID::FULLY_CONNECTED_LAYER_3;
DEBUG(errs() << "new FullyConnectedLayer_3\n");
}
~FullyConnectedLayer_3() {}
......@@ -158,6 +162,7 @@ class FullyConnectedLayer : public AbstractState {
public:
FullyConnectedLayer() {
StateID = ID::FULLY_CONNECTED_LAYER;
DEBUG(errs() << "new FullyConnectedLayer\n");
}
~FullyConnectedLayer() {}
......@@ -168,6 +173,7 @@ class ConvolutionLayer_1 : public AbstractState {
public:
ConvolutionLayer_1() {
StateID = ID::CONVOLUTION_LAYER_1;
DEBUG(errs() << "new ConvolutionLayer_1\n");
}
~ConvolutionLayer_1() {}
......@@ -178,6 +184,7 @@ class ConvolutionLayer_2 : public AbstractState {
public:
ConvolutionLayer_2() {
StateID = ID::CONVOLUTION_LAYER_2;
DEBUG(errs() << "new ConvolutionLayer_2\n");
}
~ConvolutionLayer_2() {}
......@@ -188,6 +195,7 @@ class ConvolutionLayer_3 : public AbstractState {
public:
ConvolutionLayer_3() {
StateID = ID::CONVOLUTION_LAYER_3;
DEBUG(errs() << "new ConvolutionLayer_3\n");
}
~ConvolutionLayer_3() {}
......@@ -198,6 +206,7 @@ class ConvolutionLayer_4 : public AbstractState {
public:
ConvolutionLayer_4() {
StateID = ID::CONVOLUTION_LAYER_4;
DEBUG(errs() << "new ConvolutionLayer_4\n");
}
~ConvolutionLayer_4() {}
......@@ -208,6 +217,7 @@ class ConvolutionLayer : public AbstractState {
public:
ConvolutionLayer() {
StateID = ID::CONVOLUTION_LAYER;
DEBUG(errs() << "new ConvolutionLayer\n");
}
~ConvolutionLayer() {}
......@@ -218,6 +228,7 @@ class NoPattern : public AbstractState {
public:
NoPattern() {
StateID = ID::NO_PATTERN;
DEBUG(errs() << "new NoPattern\n");
}
~NoPattern() {}
......@@ -545,8 +556,8 @@ void CodeGenStateMachine::codeGen() {
RtM->getFunction(StringRef("convolution"))->getFunctionType());
DEBUG(errs() << *convolution);
// FIXME: get last argument from some intrinsic?
Args.push_back(ConstantInt::get(Type::getInt32Ty(M->getContext()), 1));
// FIXME: get last argument from some intrinsic. For now, 0
Args.push_back(ConstantInt::get(Type::getInt32Ty(M->getContext()), 0));
// Create PROMISE simulator function call
CI = CallInst::Create(convolution, Args, "");
}
......@@ -558,11 +569,12 @@ void CodeGenStateMachine::codeGen() {
RtM->getFunction(StringRef("fullyConnected"))->getFunctionType());
DEBUG(errs() << *fullyConnected);
// FIXME: get last argument from some intrinsic?
Args.push_back(ConstantInt::get(Type::getInt32Ty(M->getContext()), 1));
// FIXME: get last argument from some intrinsic. For now, 0
Args.push_back(ConstantInt::get(Type::getInt32Ty(M->getContext()), 0));
// Create PROMISE simulator function call
CI = CallInst::Create(fullyConnected, Args, "");
}
break;
default:
llvm_unreachable("Unexpected CodeGenStateMachine State\n");
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment