Skip to content

Commit e7a8682

Browse files
committed
fixes
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 0856212 commit e7a8682

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

third_party/intel/backend/driver.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ def compile_module_from_src(src: str, name: str, include_dirs: list[str] | None
291291
return SpirvUtils(cache_path)
292292
if name == '__triton_launcher':
293293
return TritonLauncher(cache_path)
294-
if name in ['proton_utils', 'xpu_api']:
294+
if name == 'proton_utils':
295295
return cache_path
296296

297297
return _load_module_from_path(name, cache_path)
@@ -950,8 +950,8 @@ def build_proton_help_lib(self):
950950
dirname_third_party = os.path.realpath(dirname + "../../..")
951951
include_dir = dirname_third_party + "/proton/csrc/include/"
952952
return compile_module_from_src(
953-
src=Path(dirname_third_party + "/proton/csrc/lib/Driver/GPU/XpuApiCompileInRuntime.cpp").read_text(),
954-
name="xpu_api",
953+
src=Path(Path(dirname).joinpath("proton_utils.cpp")).read_text(),
954+
name="proton_utils",
955955
include_dirs=[include_dir],
956956
)
957957

third_party/proton/csrc/include/Driver/GPU/XpuApi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ namespace proton {
77

88
namespace xpu {
99

10-
extern std::string XPU_API_UTILS;
10+
extern std::string PROTON_UTILS;
1111

1212
Device getDevice(uint64_t index);
1313

third_party/proton/csrc/lib/Driver/GPU/XpuApi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ namespace proton {
88

99
namespace xpu {
1010

11-
std::string XPU_API_UTILS;
11+
std::string PROTON_UTILS;
1212

1313
typedef void (*GetDevicePropertiesFunc)(uint64_t, uint32_t *, uint32_t *,
1414
uint32_t *, uint32_t *, char[256]);
1515

1616
Device getDevice(uint64_t index) {
17-
void *handle = dlopen(XPU_API_UTILS.data(), RTLD_LAZY);
17+
void *handle = dlopen(PROTON_UTILS.data(), RTLD_LAZY);
1818
if (!handle) {
1919
const char *dlopen_error = dlerror();
2020
throw std::runtime_error(std::string("Failed to load library: ") +

third_party/proton/csrc/lib/Profiler/Xpupti/XpuptiProfiler.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ void CallbackCommon(pti_callback_domain domain,
278278
typedef void (*EnumDeviceUUIDsFunc)(std::vector<std::array<uint8_t, 16>>);
279279

280280
int callEnumDeviceUUIDs(const std::string &utils_cache_path) {
281-
void *handle = dlopen(xpu::XPU_API_UTILS.data(), RTLD_LAZY);
281+
void *handle = dlopen(xpu::PROTON_UTILS.data(), RTLD_LAZY);
282282
if (!handle) {
283283
std::cerr << "Failed to load library: " << dlerror() << std::endl;
284284
return 1;
@@ -303,7 +303,7 @@ int callEnumDeviceUUIDs(const std::string &utils_cache_path) {
303303
typedef void (*WaitOnSyclQueueFunc)(void *);
304304

305305
int callWaitOnSyclQueue(void *syclQueue) {
306-
void *handle = dlopen(xpu::XPU_API_UTILS.data(), RTLD_LAZY);
306+
void *handle = dlopen(xpu::PROTON_UTILS.data(), RTLD_LAZY);
307307
if (!handle) {
308308
std::cerr << "Failed to load library: " << dlerror() << std::endl;
309309
return 1;
@@ -328,8 +328,8 @@ int callWaitOnSyclQueue(void *syclQueue) {
328328
void XpuptiProfiler::XpuptiProfilerPimpl::doStart() {
329329
// should be call to shared lib
330330
XpuptiProfiler &profiler = threadState.profiler;
331-
if (xpu::XPU_API_UTILS != "") {
332-
callEnumDeviceUUIDs(xpu::XPU_API_UTILS);
331+
if (xpu::PROTON_UTILS != "") {
332+
callEnumDeviceUUIDs(xpu::PROTON_UTILS);
333333
}
334334

335335
xpupti::viewSetCallbacks<true>(allocBuffer, completeBuffer);

third_party/proton/csrc/lib/Session/Session.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Profiler *makeProfiler(const std::string &name, void *sycl_queue = nullptr,
2727
}
2828
#ifdef TRITON_BUILD_PROTON_XPU
2929
if (proton::toLower(name) == "xpupti") {
30-
xpu::XPU_API_UTILS = utils_cache_path;
30+
xpu::PROTON_UTILS = utils_cache_path;
3131
return &XpuptiProfiler::instance().setSyclQueue(sycl_queue);
3232
}
3333
#endif

0 commit comments

Comments
 (0)