Skip to content

Instantly share code, notes, and snippets.

View makslevental's full-sized avatar
💩

Maksim Levental makslevental

💩
View GitHub Profile
diff --git a/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h b/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h
index 2dd35c097c796..8dcf91e5806bd 100644
--- a/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h
+++ b/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h
@@ -20,6 +20,7 @@
#define MLIR_BINDINGS_PYTHON_NANOBINDADAPTORS_H
#include <cstdint>
+#include <optional>
Index: mlir/include/mlir/Bindings/Python/NanobindAdaptors.h
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h b/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h
--- a/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h (revision 468275dc491e88d68def668f1a23cde9ba952e5e)
+++ b/mlir/include/mlir/Bindings/Python/NanobindAdaptors.h (date 1752159288603)
@@ -43,18 +43,14 @@
/// with a raw handle (unowned). The returned object's lifetime may not extend
# Part of the LLVM Project, 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
# Copyright (c) 2025.
[project]
name = "mlir-python-bindings"
version = "0.0.1"
requires-python = ">=3.8,<=3.13"
[project.urls]
//===--- ItaniumMangle.cpp - Itanium C++ Name Mangling ----------*- C++ -*-===//
//
// Part of the LLVM Project, 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
//
//===----------------------------------------------------------------------===//
//
// Implements C++ name mangling according to the Itanium C++ ABI,
// which is used in GCC 3.2 and newer (and many compilers that are
@makslevental
makslevental / lc_cluster_soln_strats.py
Created May 30, 2025 18:21
cluster lc by soln strat
import re
import time
from collections import defaultdict
from pprint import pprint
import hdbscan
import leetcode
from sklearn.feature_extraction.text import TfidfVectorizer
from sklearn.preprocessing import normalize
@makslevental
makslevental / gen.py
Last active May 12, 2025 21:57
gen conundrum
import dis
import inspect
def my_generator():
frame = inspect.currentframe()
print(frame.f_code.co_consts)
x = yield
frame = inspect.currentframe()
print(frame.f_code.co_consts)
%1085 = tail call <16 x float> @llvm.amdgcn.mfma.f32.32x32x16.f16(<8 x half> %1056, <8 x half> %1052, <16 x float> %1084, i32 0, i32 0, i32 0), !dbg !62
%1947 = shufflevector <2 x float> %1478, <2 x float> poison, <16 x i32> zeroinitializer, !dbg !62
%1948 = fmul <16 x float> %1085, %1947, !dbg !62
%1949 = tail call <16 x float> @llvm.amdgcn.mfma.f32.32x32x16.f16(<8 x half> %1931, <8 x half> %1906, <16 x float> %1948, i32 0, i32 0, i32 0), !dbg !62
/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
|* *|
|* Target Register Enum Values *|
|* *|
|* Automatically generated file, do not edit! *|
|* *|
\*===----------------------------------------------------------------------===*/
#ifdef GET_REGINFO_ENUM
@makslevental
makslevental / v_pk_add_f32.s
Last active April 25, 2025 04:13
unpack v_pk_add_f32
.section .AMDGPU.config,"",@progbits
.long 47176
.long 11468865
.long 47180
.long 5008
.long 47200
.long 0
.long 4
.long 0
.long 8
from enum import Flag
from pprint import pprint
class SchedGroupMask(Flag):
NONE = 0
ALU = 1 << 0
VALU = 1 << 1
SALU = 1 << 2
MFMA = 1 << 3