Skip to content

Instantly share code, notes, and snippets.

View traversaro's full-sized avatar

Silvio Traversaro traversaro

View GitHub Profile
@traversaro
traversaro / allocate_vram.py
Last active October 17, 2025 13:16
Stress GPU VRAM
#!/usr/bin/env python3
"""
allocate_vram.py — attempt to allocate ~80 GiB of VRAM with PyTorch.
Usage examples:
python allocate_vram.py # try for 80 GiB on cuda:0
python allocate_vram.py --target-gib 78 # pick a different target
python allocate_vram.py --chunk-gib 2 # bigger allocation chunks
python allocate_vram.py --device cuda:1 # choose another GPU
"""
# SCM syntax highlighting & preventing 3-way merges
pixi.lock merge=binary linguist-language=YAML linguist-generated=true
@traversaro
traversaro / README.md
Last active July 18, 2025 12:27
Reproduce CONDA_BUILD_CROSS_COMPILATION inconsistency between conda-build and rattler-build in noarch: python recipes

Reproduce noarch Cross-Compilation Issue

This project reproduces an issue where CONDA_BUILD_CROSS_COMPILATION environment variable behavior differs between conda-build and rattler-build for noarch: python builds.

Issue Description

  • Expected behavior (conda-build): For noarch: python builds, CONDA_BUILD_CROSS_COMPILATION should not be set to "1" since noarch packages are platform-independent.
  • Observed behavior (rattler-build): CONDA_BUILD_CROSS_COMPILATION is set to "1" even for noarch builds, which is a change in behavior.

Project Structure

@traversaro
traversaro / log.txt
Created April 22, 2025 08:26
Last successful build libmatio
2024-12-04T06:05:06.2432843Z ##[section]Starting: Run docker build
2024-12-04T06:05:06.2444567Z ==============================================================================
2024-12-04T06:05:06.2445436Z Task : Command line
2024-12-04T06:05:06.2445854Z Description : Run a command line script using Bash on Linux and macOS and cmd.exe on Windows
2024-12-04T06:05:06.2446338Z Version : 2.246.1
2024-12-04T06:05:06.2446717Z Author : Microsoft Corporation
2024-12-04T06:05:06.2447087Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/command-line
2024-12-04T06:05:06.2447554Z ==============================================================================
2024-12-04T06:05:07.4295322Z Generating script.
2024-12-04T06:05:07.4308154Z ========================== Starting Command Output ===========================
@traversaro
traversaro / getbrokenpkgs.py
Last active March 19, 2025 22:11
Packages in conda-forge osx-arm64 built with rattler-build 0.38.0
#!/usr/bin/env python3
import requests
import datetime
import io
import conda_package_handling.api as cpha
import tempfile
import os
import subprocess
import json
import tempfile
@traversaro
traversaro / listofpkgs
Created March 19, 2025 15:35
List of package possibly affected by rattler-build 0.38.0
micromamba-2.0.7-0.tar.bz2 was built on 2025-03-11 15:32:25.031000
adbc-driver-manager-1.5.0-py310h853098b_0.conda was built on 2025-03-08 02:49:34.692000
adbc-driver-manager-1.5.0-py311h155a34a_0.conda was built on 2025-03-08 02:52:55.707000
adbc-driver-manager-1.5.0-py312hd8f9ff3_0.conda was built on 2025-03-08 02:49:51.360000
adbc-driver-manager-1.5.0-py313h928ef07_0.conda was built on 2025-03-08 02:49:54.033000
adbc-driver-manager-1.5.0-py39h941272d_0.conda was built on 2025-03-08 02:49:41.234000
airspy-1.0.10-h5505292_1.conda was built on 2025-03-10 21:21:41.304000
airspyhf-1.6.8-h5505292_1.conda was built on 2025-03-10 21:32:44.997000
amrex-25.3-mpi_mpich_h77a6ea5_0.conda was built on 2025-03-08 03:28:07.487000
amrex-25.3-mpi_mpich_hc112c7c_0.conda was built on 2025-03-07 04:07:16.425000
@traversaro
traversaro / Broken _1 build
Last active March 19, 2025 12:38
Save log related to broken urdfdom build
2025-03-07T09:44:06.1196080Z ##[section]Starting: osx osx_arm64_
2025-03-07T09:44:06.3258560Z ##[section]Starting: Initialize job
2025-03-07T09:44:06.3261270Z Agent name: 'Azure Pipelines 13'
2025-03-07T09:44:06.3261790Z Agent machine name: 'Mac-1741340118930'
2025-03-07T09:44:06.3262070Z Current agent version: '3.251.0'
2025-03-07T09:44:06.3294740Z ##[group]Operating System
2025-03-07T09:44:06.3295000Z macOS
2025-03-07T09:44:06.3295160Z 13.7.4
2025-03-07T09:44:06.3295310Z 22H420
2025-03-07T09:44:06.3295470Z ##[endgroup]
@traversaro
traversaro / YarpDevReturnValueCompat.h
Last active August 30, 2025 16:58
Header that simplifies implementing YARP devices that work in both YARP 3.11, 3.12 and 4.0
#ifndef YARP_DEV_RETURN_VALUE_COMPAT_H
#define YARP_DEV_RETURN_VALUE_COMPAT_H
// Defines YARP_VERSION_* macro
#include <yarp/conf/version.h>
// These macros simplify the migration of the devices implementation from YARP 3.11 to YARP 3.12,
// and from YARP 3.12 to 4.0
// where the interfaces migrated from using bool as return values to use yarp::dev::ReturnValue,
// see https://github.com/robotology/yarp/discussions/3168
@traversaro
traversaro / .gitattributes
Last active January 1, 2025 15:22
Reproduce missing support for handling hardcoded install prefix in CMake files in rattler-build 0.33
# SCM syntax highlighting
pixi.lock linguist-language=YAML linguist-generated=true
@traversaro
traversaro / CMakeLists.txt
Created November 19, 2024 12:25
Example of why quotes should not be used in cmake-args
cmake_minimum_required(VERSION 3.15)
# Project Name without specifying languages
project(MyCMakeProject VERSION 1.0 LANGUAGES NONE)
# Define two options
option(ENABLE_FEATURE_A "Enable Feature A" OFF)
option(ENABLE_FEATURE_B "Enable Feature B" OFF)
# Print the values of the options