Skip to content

Commit fd37e36

Browse files
committed
cleanup && add pti.txt
Signed-off-by: Anatoly Myachev <[email protected]>
1 parent 9064ee9 commit fd37e36

File tree

5 files changed

+8
-40
lines changed

5 files changed

+8
-40
lines changed

.github/pins/pti.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
15a201d25e5659692613b98ee33513263b689101

.github/workflows/build-test-reusable.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,10 @@ jobs:
288288
- name: Build PTI && Run Proton tests
289289
if: matrix.suite == 'rest' && inputs.driver_version == 'rolling' && inputs.device == 'max1100'
290290
run: |
291+
PTI_COMMIT_ID="$(<.github/pins/pti.txt)"
291292
git clone https://github.com/intel/pti-gpu.git
292293
cd pti-gpu
293-
git checkout 15a201d25e5659692613b98ee33513263b689101
294+
git checkout $PTI_COMMIT_ID
294295
cd sdk
295296
cmake --preset linux-icpx-release
296297
BUILD_TESTING=1 PTI_BUILD_SAMPLES=1 cmake --build --preset linux-icpx-release

.github/workflows/triton-benchmarks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,11 @@ jobs:
117117
pip install .
118118
119119
- name: Build PTI from source
120-
id: build-pti
121120
run: |
121+
PTI_COMMIT_ID="$(<.github/pins/pti.txt)"
122122
git clone https://github.com/intel/pti-gpu.git
123123
cd pti-gpu
124-
git checkout 15a201d25e5659692613b98ee33513263b689101
124+
git checkout $PTI_COMMIT_ID
125125
cd sdk
126126
cmake --preset linux-icpx-release
127127
BUILD_TESTING=1 PTI_BUILD_SAMPLES=1 cmake --build --preset linux-icpx-release

python/tutorials/09-persistent-matmul.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ def bench_fn(label, reps, warmup_reps, fn, *args):
673673
for _ in range(warmup_reps):
674674
fn(*args)
675675
#FIXME: Enable for XPU once proton support works.
676-
if True or is_cuda():
676+
if is_cuda():
677677
with proton_context():
678678
for _ in range(reps):
679679
fn(*args)
@@ -783,11 +783,11 @@ def show_profile(precision, profile_name):
783783

784784
validate(32, 32, 32, dtype)
785785
validate(8192, 8192, args.K_range[0], dtype)
786-
if True or is_cuda():
786+
if is_cuda():
787787
proton.start("matmul", hook="triton")
788788
proton.deactivate()
789789
for K in range(args.K_range[0], args.K_range[1] + 1, args.K_step):
790790
bench(K, dtype)
791-
if True or is_cuda():
791+
if is_cuda():
792792
proton.finalize()
793793
show_profile(args.prec, "matmul")

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

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,6 @@ struct XpuptiProfiler::XpuptiProfilerPimpl
264264

265265
static void allocBuffer(uint8_t **buffer, size_t *bufferSize);
266266
static void completeBuffer(uint8_t *buffer, size_t size, size_t validSize);
267-
// static void callbackFn(void *userData, CUpti_CallbackDomain domain,
268-
// CUpti_CallbackId cbId, const void *cbData);
269267
static void callbackFn(pti_callback_domain domain,
270268
pti_api_group_id driver_api_group_id,
271269
uint32_t driver_api_id,
@@ -354,32 +352,6 @@ void XpuptiProfiler::XpuptiProfilerPimpl::callbackFn(
354352
} else {
355353
throw std::runtime_error("[PROTON] callbackFn failed");
356354
}
357-
358-
/* switch (domain) {
359-
case PTI_DOMAIN_DRIVER_GPU_OPERATION_APPEND:
360-
CallbackGPUOperationAppend(domain, driver_api_group_id, driver_api_id,
361-
backend_context, cb_data, user_data);
362-
break;
363-
case PTI_DOMAIN_GPU_OPERATION_COMPLETED:
364-
CallbackGPUOperationCompletion(domain, driver_api_group_id, driver_api_id,
365-
backend_context, cb_data, user_data);
366-
break;
367-
default: {
368-
std::cout << "In " << __func__ << ", domain: " << domain
369-
<< ", driver_group_id: " << driver_api_group_id
370-
<< ", driver_api_id: " << driver_api_id << std::endl;
371-
372-
const char* name_ptr = nullptr;
373-
374-
if (PTI_SUCCESS == ptiViewGetApiIdName(driver_api_group_id, driver_api_id,
375-
&name_ptr) ) { std::cout << ", API name: " << name_ptr << std::endl; } else {
376-
std::cout << ", Unknown API name" << std::endl;
377-
}
378-
break;
379-
}
380-
}
381-
std::cout << std::endl;
382-
*/
383355
}
384356

385357
void CallbackCommon(pti_callback_domain domain,
@@ -458,7 +430,6 @@ int callWaitOnSyclQueue(const std::string &utils_cache_path, void *syclQueue) {
458430
}
459431

460432
void XpuptiProfiler::XpuptiProfilerPimpl::doStart() {
461-
std::cout << "doStart\n" << std::flush;
462433
// should be call to shared lib
463434
XpuptiProfiler &profiler = threadState.profiler;
464435
if (profiler.utils_cache_path != "") {
@@ -501,7 +472,6 @@ void XpuptiProfiler::XpuptiProfilerPimpl::doStart() {
501472
xpupti::viewEnable<true>(PTI_VIEW_DEVICE_GPU_KERNEL);
502473
xpupti::viewEnable<true>(PTI_VIEW_DEVICE_GPU_MEM_FILL);
503474
xpupti::viewEnable<true>(PTI_VIEW_DEVICE_GPU_MEM_COPY);
504-
std::cout << "doStart2\n" << std::flush;
505475
xpupti::subscribe<true>(&subscriber, callbackFn, &subscriber);
506476
// xpupti::viewEnable<true>(PTI_VIEW_DEVICE_GPU_MEM_COPY);
507477
// xpupti::viewEnable<true>(PTI_VIEW_DEVICE_GPU_MEM_FILL);
@@ -511,10 +481,8 @@ void XpuptiProfiler::XpuptiProfilerPimpl::doStart() {
511481
// xpupti::viewEnable<true>(PTI_VIEW_LEVEL_ZERO_CALLS);
512482
// setGraphCallbacks(subscriber, /*enable=*/true);
513483
// setRuntimeCallbacks(subscriber, /*enable=*/true);
514-
std::cout << "doStart::enableDomain\n" << std::flush;
515484
xpupti::enableDomain<true>(subscriber,
516485
PTI_CB_DOMAIN_DRIVER_GPU_OPERATION_APPENDED, 1, 1);
517-
std::cout << "doStart::enableDomain after\n" << std::flush;
518486
// setDriverCallbacks(subscriber, /*enable=*/true);
519487
}
520488

@@ -551,10 +519,8 @@ void XpuptiProfiler::XpuptiProfilerPimpl::doStop() {
551519
// setGraphCallbacks(subscriber, /*enable=*/false);
552520
// setRuntimeCallbacks(subscriber, /*enable=*/false);
553521
// setDriverCallbacks(subscriber, /*enable=*/false);
554-
std::cout << "doStop::disableDomain\n" << std::flush;
555522
xpupti::disableDomain<true>(subscriber,
556523
PTI_CB_DOMAIN_DRIVER_GPU_OPERATION_APPENDED);
557-
std::cout << "doStop::disableDomain after\n" << std::flush;
558524
xpupti::unsubscribe<true>(subscriber);
559525
// cupti::finalize<true>();
560526
}

0 commit comments

Comments
 (0)