Skip to content

Commit

Permalink
Cluster Serving refine Timer (intel-analytics#2825)
Browse files Browse the repository at this point in the history
  • Loading branch information
Litchilitchy committed Sep 8, 2020
1 parent 957f537 commit a8bea10
Showing 1 changed file with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,18 @@ class OpenVINOModel(var modelHolder: OpenVINOModelHolder,
transferListOfActivityToActivityOfBatch(outputs, batchSize)
}

override def copy(num: Int): Array[AbstractModel] = Array(this)
override def copy(num: Int): Array[AbstractModel] = {
val arr = new Array[AbstractModel](1)

(0 until 1).foreach(i => {
val modelBytes = modelHolder.modelBytes.clone()
val weightBytes = modelHolder.weightBytes.clone()

arr(i) = new OpenVINOModel(
new OpenVINOModelHolder(modelBytes, weightBytes), isInt8, batchSize, DeviceType.CPU)
})
arr
}

override def release(): Unit = {
isReleased match {
Expand Down

0 comments on commit a8bea10

Please sign in to comment.