Closed mfbalin closed 12 hours ago
To trigger regression tests:
@dgl-bot run [instance-type] [which tests] [compare-with-branch]
;
For example: @dgl-bot run g4dn.4xlarge all dmlc/master
or @dgl-bot run c5.9xlarge kernel,api dmlc/master
https://github.com/dmlc/dgl/pull/7492#discussion_r1663506205
@frozenbugs What do you mean here? The member functions defined inside class are inline by default.
There is no way to force from a base class so that all derived classes have the same constructor @frozenbugs. So I don't have a way to force derived classes to have a constructor that take a single capacity parameter.
With the most recent changes, the PartitionedCachePolicy
class is compiled only once even if more cache policies are added in the future, since we are using polymorphism now.
Description
The S3-FIFO cache policy logic is serial for now. The partitioned policy partitions the keys in a deterministic manner to different cache policies we construct, so that each policy can run in parallel. Since performance is important, phmap hash table is used instead of std::unordered_map, which is available as a submodule. I went ahead and updated it to the latest available version to take advantage of potential bug fixes and performance improvements.
40 threads lead to a speedup of around 17x in my preliminary experiments with no change to the cache miss rate.
Checklist
Please feel free to remove inapplicable items for your PR.
Changes