Skip to content

Instantly share code, notes, and snippets.

View glyh's full-sized avatar
🐫
Made with OCaml

Yihang "Corvo" Liu glyh

🐫
Made with OCaml
  • o1Labs
  • 17:16 (UTC +08:00)
View GitHub Profile
@glyh
glyh / gist:e0c263b62b36e16727924411b79b2af3
Created January 7, 2025 10:21
template inlining memleak
mkdir -p build/Release
cd build/Release && cmake -DCMAKE_BUILD_TYPE=Release -DUSE_CUDA=OFF -DUSE_BANG=OFF -DUSE_KUNLUN=OFF -DUSE_ASCEND=OFF -DUSE_BACKTRACE=ON -DBUILD_TEST=ON -DBUILD_DIST=OFF -DBUILD_NNET=OFF ../.. && make -j8
Configuring for Release build.
-- Found Python: /sbin/python3.13 (found version "3.13.1") found components: Interpreter Development Development.Module Development.Embed
CMake Deprecation Warning at 3rd-party/pybind11/CMakeLists.txt:8 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
/home/lyh/PullGround/InfiniTensor/src/core/op_type.cc:6:18:
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
@glyh
glyh / gist:e2ca0b404504ac7b40d41c0cacc027cd
Created January 7, 2025 08:48
infinitensor build failure
mkdir -p build/Release
cd build/Release && cmake -DCMAKE_BUILD_TYPE=Release -DUSE_CUDA=OFF -DUSE_BANG=OFF -DUSE_KUNLUN=OFF -DUSE_ASCEND=OFF -DUSE_BACKTRACE=ON -DBUILD_TEST=ON -DBUILD_DIST=OFF -DBUILD_NNET=OFF ../.. && make -j8
Configuring for Release build.
-- Found Python: /sbin/python3.13 (found version "3.13.1") found components: Interpreter Development Development.Module Development.Embed
CMake Deprecation Warning at 3rd-party/pybind11/CMakeLists.txt:8 (cmake_minimum_required):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.
Update the VERSION argument <min> value. Or, use the <min>...<max> syntax
to tell CMake that the project requires at least <min> but has been updated
@glyh
glyh / vector_types.h
Last active April 3, 2024 07:51
vector_types.h
/*
* Copyright 1993-2018 NVIDIA Corporation. All rights reserved.
*
* NOTICE TO LICENSEE:
*
* This source code and/or documentation ("Licensed Deliverables") are
* subject to NVIDIA intellectual property rights under U.S. and
* international Copyright laws.
*
* These Licensed Deliverables contained herein is PROPRIETARY and
```lua
-- this template is borrowed from nvim-lspconfig
local on_windows = vim.loop.os_uname().version:match("Windows")
local function join_paths(...)
local path_sep = on_windows and "\\" or "/"
local result = table.concat({ ... }, path_sep)
return result
end
-- this template is borrowed from nvim-lspconfig
local on_windows = vim.loop.os_uname().version:match("Windows")
local function join_paths(...)
local path_sep = on_windows and "\\" or "/"
local result = table.concat({ ... }, path_sep)
return result
end
vim.cmd([[set runtimepath=$VIMRUNTIME]])
@glyh
glyh / emojis
Last active February 4, 2022 13:22
emojis
// =============================================================================
//
// Waybar configuration
//
// Configuration reference: https://github.com/Alexays/Waybar/wiki/Configuration
//
// =============================================================================
{
// -------------------------------------------------------------------------
#!/bin/sh
#|-*- mode:lisp -*-|#
#|
exec ros -Q -- $0 "$@"
|#
(progn ;;init forms
(ros:ensure-asdf)
#+quicklisp(ql:quickload '(swank com.google.base asdf uiop cffi unix-opts) :silent t))
(in-package :cl)
-- this template is borrowed from nvim-lspconfig
local on_windows = vim.loop.os_uname().version:match("Windows")
local function join_paths(...)
local path_sep = on_windows and "\\" or "/"
local result = table.concat({ ... }, path_sep)
return result
end
vim.cmd([[set runtimepath=$VIMRUNTIME]])
@glyh
glyh / rifle.conf
Created January 3, 2022 00:44
rifle.conf
# vim: ft=cfg
#
# This is the configuration file of "rifle", ranger's file executor/opener.
# Each line consists of conditions and a command. For each line the conditions
# are checked and if they are met, the respective command is run.
#
# Syntax:
# <condition1> , <condition2> , ... = command
#
# The command can contain these environment variables:
@glyh
glyh / indent.nim
Created December 24, 2021 05:05
Indent Parser in Lark
import nimpy, ./macros # the macros in the other GIST
assert(pyImport("sys").version_info.major.to(int) >= 3)
let
lark = pyImport("lark")
idt = pyImport("lark.indenter")
tree_grammar = """
?start: _NL* tree
tree: NAME _NL [_INDENT tree+ _DEDENT]