Skip to content

Commit e2f24d1

Browse files
committed
WIP: rocprofv3
1 parent e7aaf6c commit e2f24d1

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

gen/rocprof/generator.jl

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,17 @@ using Clang.Generators
22
using JuliaFormatter
33

44
include_dir = normpath("/opt/rocm/include")
5-
rocfft_dir = joinpath(include_dir, "rocprofiler/v2")
5+
rocprof_dir = joinpath(include_dir, "rocprofiler-sdk")
66
options = load_options("rocprof/rocprof-generator.toml")
77

88
args = get_default_args()
99
push!(args, "-I$include_dir")
1010

1111
headers = [
12-
joinpath(rocfft_dir, header)
13-
for header in readdir(rocfft_dir)
14-
if endswith(header, ".h")
12+
joinpath(rocprof_dir, header)
13+
# for header in readdir(rocprof_dir)
14+
# if endswith(header, ".h")
15+
for header in ("rocprofiler.h",)
1516
]
1617

1718
ctx = create_context(headers, args, options)

gen/rocprof/rocprof-generator.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[general]
2-
library_name = "librocprofiler64v2"
2+
library_name = "librocprofiler-sdk-tool"
33
output_file_path = "./librocprof.jl"
44
export_symbol_prefixes = []
55

src/discovery/discovery.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module ROCmDiscovery
22

33
export lld_artifact, lld_path, libhsaruntime, libdevice_libs, libhip
44
export librocblas, librocsparse, librocsolver
5-
export librocrand, librocfft, libMIOpen_path, librocprofiler64v2
5+
export librocrand, librocfft, libMIOpen_path, librocprofiler_sdk_tool
66

77
using LLD_jll
88
using ROCmDeviceLibs_jll
@@ -56,6 +56,7 @@ function __init__()
5656
global librocrand = ""
5757
global librocfft = ""
5858
global libMIOpen_path = ""
59+
global librocprofiler_sdk_tool = ""
5960

6061
if Sys.islinux() && isdir("/sys/class/kfd/kfd/topology/nodes/")
6162
for node_id in readdir("/sys/class/kfd/kfd/topology/nodes/")
@@ -103,7 +104,7 @@ function __init__()
103104
global librocrand = find_rocm_library(lib_prefix * "rocrand"; rocm_path)
104105
global librocfft = find_rocm_library(lib_prefix * "rocfft"; rocm_path)
105106
global libMIOpen_path = find_rocm_library(lib_prefix * "MIOpen"; rocm_path)
106-
global librocprofiler64v2 = find_rocm_library(lib_prefix * "rocprofiler64v2"; rocm_path)
107+
global librocprofiler_sdk_tool = find_rocm_library(lib_prefix * "rocprofiler-sdk-tool"; rocm_path)
107108
catch err
108109
@error """ROCm discovery failed!
109110
Discovered ROCm path: $rocm_path.

src/utils.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function versioninfo()
1313
_status(functional(:rocrand)) "rocRAND" _ver(:rocrand, rocRAND.version) _libpath(librocrand);
1414
_status(functional(:rocfft)) "rocFFT" _ver(:rocfft, rocFFT.version) _libpath(librocfft);
1515
_status(functional(:MIOpen)) "MIOpen" _ver(:MIOpen, MIOpen.version) _libpath(libMIOpen_path);
16-
_status(functional(:rocprofv2)) "rocprofv2" _ver(:rocprofv2, Profiler.version) _libpath(librocprofiler64v2);
16+
_status(functional(:rocprofv3)) "rocprof-sdk-tool" _ver(:rocprofv3, Profiler.version) _libpath(librocprofiler_sdk_tool);
1717
]
1818

1919
PrettyTables.pretty_table(data; header=[
@@ -89,12 +89,12 @@ function functional(component::Symbol)
8989
return !isempty(librocfft)
9090
elseif component == :MIOpen
9191
return !isempty(libMIOpen_path)
92-
elseif component == :rocprofv2
93-
return !isempty(librocprofiler64v2)
92+
elseif component == :rocprofv3
93+
return !isempty(librocprofiler_sdk_tool)
9494
elseif component == :all
9595
for component in (
9696
:hip, :lld, :device_libs, :rocblas, :rocsolver,
97-
:rocsparse, :rocrand, :rocfft, :MIOpen, rocprofv2,
97+
:rocsparse, :rocrand, :rocfft, :MIOpen, :rocprofv3,
9898
)
9999
functional(component) || return false
100100
end

0 commit comments

Comments
 (0)