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

Nvbit support #2

Open
wants to merge 78 commits into
base: main
Choose a base branch
from
Open

Nvbit support #2

wants to merge 78 commits into from

Conversation

christopherscott0
Copy link

Major refactoring of gs_patterns into 3 components gs_patterns binary, libgs_patterns_core.so and libgsnv_trace.so.
Migrated to C++.
Added support for instrumenting CUDA kernels via nvbit/libgsnv_trace.so and also extracting an nvbit trace file.
The extracted nvbit trace file can be used to run gs_patterns similarly to how pin traces are used.
Updated various readme files with details on how to use the new functionality.

christopherscott0 and others added 30 commits March 1, 2024 16:15
Fix Link order on Linux
…equire compressed trace file to end in .gz so we can use symlinks etc).

Got rid of compiler warnings.
…tate, remove some statics and unused variables.

Tested.
… pin trace file pattern generation.

Simplfied signature of some library functions which now use MemPatterns interfaces.
Simplified gs_patterns.cpp main to use the new MemPatternsForPin and interfaces.
…to gs_patterns.cpp which handles trace file based input.

Refatored second_pass handling so it can be done with any code able to get a collection of trace_t's.
Improved filename creation logic as well.
…ethods.

First cut of MemPatternsForNV (gsnv_patterns.cpp) -- no functional but compiles.
Build libgs_patterns_core as shared lib - required for nvbit linkage.
gsnv_patterns converted to header file to simplify nvbit build.
Some missing default implemetations for gsnv_patterns.
Instroduced a file runner for gsnv_patterns which can write and read an nvbit trace binary output file
checkpoint for nvbit <non-functional>
Call nvgs_patterns on each mem_trace callback
@jyoung3131 jyoung3131 requested review from plavin and jyoung3131 May 6, 2024 15:15
christopherscott0 and others added 12 commits May 15, 2024 16:05
…en Pin and NVBit.

InstrWindow is now dynamically allocated to increase max supported size(required to support 2k).
Reset and intialization now within InstrWindow class (rather than in gs_patters_core).
…by nvgs_trace.

Use iaddr field rather than base_addr for CTAs. Use base_addr comparison to addr to determine mem instructions which are part of warp for CTAs.
Removed remaining malloc calls in gs_patterns.h (a couple are still left in unused functions in utils.h).
Added partial string match to kernel name lookup to make it easier to specify kernel to trace in config.
Fixed name of config variable. Renamed min_size to max_access_size in InstrAddrAdapter to be consistent.
Add support for optional one_warp mode (handles traces from warp 0 only) which can be set via cmd line or config setting.
Pattern size length (PSIZE) can now dynamically grow between INITIAL_PSIZE(2^15) and MAX_PSIZE(2^30) on each pattern array.
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.

1 participant