Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kimmy/dpe benchmark #136

Merged
merged 9 commits into from
Feb 19, 2021
Merged

Kimmy/dpe benchmark #136

merged 9 commits into from
Feb 19, 2021

Conversation

jya-kmu
Copy link
Contributor

@jya-kmu jya-kmu commented Feb 17, 2021

No description provided.

@coveralls
Copy link

coveralls commented Feb 17, 2021

Pull Request Test Coverage Report for Build 581978162

  • 57 of 91 (62.64%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.3%) to 81.63%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/utils.h 0 1 0.0%
src/utils.cc 57 90 63.33%
Totals Coverage Status
Change from base Build 559151939: -0.3%
Covered Lines: 4968
Relevant Lines: 6086

💛 - Coveralls

src/utils.h Outdated
*
* @param total_target Total number of target.
*
* @param even_dist The device distribution is homogeneous or not.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The docs say even_dist but the argument is named homo_dist.

src/utils.cc Outdated
namespace testing {

/** Use Megabytes */
std::vector<i64> device_size {128, 1024, 4096, 16384};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is only used in one function (InitDeviceState) can you define it in that function instead of using a global variable?

src/utils.cc Outdated
std::vector<i64> device_size {128, 1024, 4096, 16384};

/** Use Megabytes/Sec */
std::vector<double> device_bandwidth {8192, 3072, 550, 120};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as device_size.

src/utils.cc Outdated
Comment on lines 123 to 124
std::vector<double> tgt_homo_dist {0.25, 0.25, 0.25, 0.25};
std::vector<double> tgt_heto_dist {0.1, 0.2, 0.3, 0.4};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same comment as device_size.

src/utils.cc Outdated
Comment on lines 250 to 258
std::vector<size_t> GenFixedNumberOfBlobs(int num,
size_t each_blob_size) {
std::vector<size_t> result;

for (auto i {0}; i < num; ++i) {
result.push_back(each_blob_size);
}
return result;
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This functionality can be achieved more efficiently (in terms of amount of code and number of instructions) with the std::vector constructor that takes a size and a default value: std::vector<size_t> vec(num, each_blob_size);. I would just replace all calls to GetFixedNumberOfBlobs(num, each_blob_size); with std::vector<T>(num, each_blob_size).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, this function is silly...

using std::chrono::time_point;
const auto now = std::chrono::high_resolution_clock::now;

enum class PlacementPolicy {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't you use hermes::api::PlacementPolicy instead of redefining the policies here?

Comment on lines 22 to 26
#define TOTAL_TARGETS 10
#define BLOB_RANGE testing::BlobSizeRange::kHuge

#define TOTAL_NUM_BLOBS 10
#define TOTAL_BLOB_SIZE GIGABYTES(10)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Google style suggests preferring const variables over macros.


assert(tgt_state.num_targets == TOTAL_TARGETS);
std::cout << "Initialize Device State.\n";
/* testing::PrintNodeState(tgt_state); */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this debug code that can be removed?

}

std::cout << "Blob placement is done.\n";
/* testing::PrintNodeState(tgt_state); */
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this debug code that can be removed?

@jya-kmu jya-kmu merged commit b018797 into master Feb 19, 2021
@jya-kmu jya-kmu deleted the kimmy/dpe_benchmark branch February 19, 2021 18:20
@jya-kmu jya-kmu restored the kimmy/dpe_benchmark branch February 21, 2021 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants