Skip to content

ShihengCao/represetative_warp_selector

Repository files navigation

Represetative warp selector for nvidia GPU. Using instruction distribution as warp features and using Kmean algorithm from sklearn to cluster.

Input: dir contains .gz trace files from Accel-sim Tracer

Output: .bin boost file, the data struct(defined in trace_parser.h) is below

// Data structure shared with external warp selector
struct KernelRepWarp {
    int kernelNumber;
    int repWarpIdx;

    template <class Archive>
    void serialize(Archive &ar, const unsigned int version) {
        ar &kernelNumber;
        ar &repWarpIdx;
    }
};

How to use
Install and replace gzstream and boost path in makefile

make clean && make

./trace_processor.out /path/to/benchmark/traces outputs

python cluster_and_select_warp.py outputs benchmark.txt

./txt_to_boost_bin benchmark.txt rptv_warp_selector.bin

The warp index is across threadblock. For example:

TB 0 0 0 
warp 0 warp 1 warp 2 warp 3
TB 1 0 0
warp 0 warp 1 warp 2 warp 3

then warpIdx 5 mean warp 1 in TB 1 0 0
Not official support for GCoM [ISCA '22], GCStack+GCScaler [ISCA '25], Accel-sim [ISCA '20]
See more details in:
https://github.com/yonsei-hpcp/gcom
https://github.com/yonsei-hpcp/gcstack_gcscaler
https://github.com/accel-sim/accel-sim-framework

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published