Skip to content

Instantly share code, notes, and snippets.

View makslevental's full-sized avatar
💩

Maksim Levental makslevental

💩
View GitHub Profile
Index: compiler/src/iree/compiler/API/CMakeLists.txt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/compiler/src/iree/compiler/API/CMakeLists.txt b/compiler/src/iree/compiler/API/CMakeLists.txt
--- a/compiler/src/iree/compiler/API/CMakeLists.txt (revision be41632fdca0ba6102d48a8cf7108fca67297056)
+++ b/compiler/src/iree/compiler/API/CMakeLists.txt (date 1731095153333)
@@ -25,6 +25,7 @@
MLIRCAPITransformDialect
@makslevental
makslevental / xrt_dispatch_test.log
Created October 19, 2024 02:47
xrt_dispatch_test
/home/mlevental/dev_projects/iree-amd-aie/cmake-build-debug/runtime/plugins/AMD-AIE/iree-amd-aie/driver/xrt/cts/xrt_dispatch_test --gtest_filter=* --gtest_color=no
Testing started at 10:47 PM ...
[00006DE4][ ] ► iree_flags_parse_checked (flags.c:449)
[00006DE4][ ] ◄ iree_flags_parse_checked t = 25245ns / 25us / 0.025245ms
[00006DE4][ ] ► iree_hal_driver_registry_register_factory (driver_registry.c:92)
[00006DE4][ ] ◄ iree_hal_driver_registry_register_factory t = 321ns / 0us / 0.000321ms
171: PID(28132): Created KMQ pcidev
281886: PID(28132): Device opened, fd=3
284722: PID(28132): Created KMQ device (0000:c5:00.1) ...
16300682: PID(28132): Allocated KMQ BO (userptr=0x7fd69c000000, size=67108864, flags=0x0, type=2, drm_bo=1)
@makslevental
makslevental / xrt_lite_dispatch_test.log
Created October 19, 2024 02:03
xrt_lite_dispatch_test log
/home/mlevental/dev_projects/iree-amd-aie/cmake-build-debug/runtime/plugins/AMD-AIE/iree-amd-aie/driver/xrt-lite/cts/xrt_lite_dispatch_test --gtest_filter=* --gtest_color=no
Testing started at 10:02 PM ...
[00005BE9][ ] ► iree_flags_parse_checked (flags.c:449)
[00005BE9][ ] ◄ iree_flags_parse_checked t = 13576ns / 13us / 0.013576ms
[00005BE9][ ] ► iree_hal_driver_registry_register_factory (driver_registry.c:92)
shim_xdna: Device opened, fd=3
[00005BE9][ ] ◄ iree_hal_driver_registry_register_factory t = 401ns / 0us / 0.000401ms
shim_xdna: allocating dev heap
[00005BE9][ ] ► iree_hal_driver_registry_try_create (driver_registry.c:269)
shim_xdna: Allocated KMQ BO (userptr=0x7e6554000000, size=67108864, flags=0x0, type=2, drm_bo=1)
; ModuleID = 'LLVMDialectModule'
source_filename = "LLVMDialectModule"
@A = private constant [1024 x i16] [i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1, i16 1,
////////////////////////////////////////////////////////////////////////////////
//
// The University of Illinois/NCSA
// Open Source License (NCSA)
//
// Copyright (c) 2014-2024, Advanced Micro Devices, Inc. All rights reserved.
//
// Developed by:
//
// AMD Research and AMD HSA Software Development
+ /home/mlevental/dev_projects/ROCR-Runtime/cmake-build-debug/rocrtst/suites/aie/matmul /home/mlevental/dev_projects/ROCR-Runtime/rocrtst/suites/aie
+ sleep 30
+ for i in {1..10}
+ echo scan
+ cat /sys/kernel/debug/kmemleak
unreferenced object 0xffff977dbb5e8e20 (size 8):
comm "matmul", pid 59758, jiffies 4304751213
hex dump (first 8 bytes):
00 00 00 00 00 00 00 00 ........
backtrace (crc 0):
// Copyright 2024 The IREE Authors
//
// Licensed under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#include <cstdint>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
//
// Created by mlevental on 9/19/24.
//
#include "amdxdna_accel.h"
#include <csignal>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
// Copyright 2024 The IREE Authors
//
// Licensed under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#include <csignal>
#include <cstdint>
#include <cstdlib>
#include <fcntl.h>
import ctypes
import fcntl
from ctypes import CDLL, c_int, c_void_p, c_size_t, c_long, c_uint32
from mmap import PROT_READ, PROT_WRITE, MAP_SHARED, MAP_PRIVATE
from pathlib import Path
import numpy as np
from ioctlpy.amdxdna_accel import (
AMDXDNA_BO_CMD,