Navigation Menu

Skip to content

Commit

Permalink
[Provisioner] Remove NETWORK_PADDING_FACTOR
Browse files Browse the repository at this point in the history
  • Loading branch information
Man Wang authored and beicy committed Apr 16, 2019
1 parent fd75ae5 commit 46e177e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
4 changes: 0 additions & 4 deletions include/glow/Runtime/Provisioner/Provisioner.h
Expand Up @@ -51,10 +51,6 @@ class Provisioner final {
/// functions.
std::unordered_map<std::string, std::unique_ptr<CompiledFunction>> functions_;

/// Padding factor to account for generated code size. Should be greater
/// than 1.0.
const float NETWORK_PADDING_FACTOR = 1.1;

/// List of available DeviceManagers added during initialization.
std::vector<DeviceManager *> devices_;
};
Expand Down
3 changes: 1 addition & 2 deletions lib/Runtime/Provisioner/Provisioner.cpp
Expand Up @@ -102,8 +102,7 @@ llvm::Error Provisioner::provision(DAGListTy &networks, Module &module) {

// Try to add functions to devices in order from largest to smallest.
for (unsigned i = 0; i < logicalDeviceSize.size(); i++) {
RETURN_ERR_IF_NOT(logicalDeviceSize[i].second * NETWORK_PADDING_FACTOR <
deviceMemory[i].second,
RETURN_ERR_IF_NOT(logicalDeviceSize[i].second < deviceMemory[i].second,
"Not enough memory to provision functions onto devices");

// Load functions on device.
Expand Down

0 comments on commit 46e177e

Please sign in to comment.