Struct EvictStrategy
Defined in File merlin_hashtable.cuh
Struct Documentation
-
struct
nv::merlin::EvictStrategy The eviction strategies.
Note
The
Scoreconcept is introduced to define the importance of each key, the larger, the more important, the less likely they will be evicted. OnkLrumode, thescoresparameter of the APIs should keepnullptr, the score for each key is assigned internally in LRU(Least Recently Used) policy. OnkCustomizedmode, thescoresshould be provided by caller.Note
Eviction occurs automatically when a bucket is full. The keys with the minimum
scorevalue are evicted first.Note
on
kLru, Set the score to the Device clock in a nanosecond, which could differ slightly from the host clock.Note
For
kEpochLruandkEpochLfu, the high 32bits would be set toglobal_epochwhile the low 32 bits istimestamporfrequency.Note
on
kLfu, Frequency increment provided by caller via the input parameter ofscoresofinsert-likeAPIs as the increment of frequency. when the scores reaches to the max ofuint64_t, it will not increase any more.Note
On
kEpochLru, the high 32bits is the global epoch provided via the input parameter ofglobal_epoch, the low 32bits is equal to(device_clock <blockquote><blockquote>‍20) & 0xffffffffwith granularity close to 1 ms.Note
On
kEpochLfu, the high 32bits is the global epoch provided via the input parameter ofglobal_epoch, the low 32bits is the frequency, the frequency will keep constant after reaching the max value of0xffffffff.Note
On
kCustomized, fully provided by the caller via the input parameter ofscoresofinsert-likeAPIs.