Skip to content

Instantly share code, notes, and snippets.

View songyuc's full-sized avatar
🎯
Focusing

songyuc

🎯
Focusing
View GitHub Profile
(ros_env) C:\Users\songyucheng>mamba install vs2022_win-64
__ __ __ __
/ \ / \ / \ / \
/ \/ \/ \/ \
███████████████/ /██/ /██/ /██/ /████████████████████████
/ / \ / \ / \ / \ \____
/ / \_/ \_/ \_/ \ o \__,
/ _/ \_____/ `
|/
cmake_minimum_required(VERSION 3.23)
set(CMAKE_CUDA_COMPILER "/usr/local/cuda/bin/nvcc")
# NECESSARY: because we need to specify the CUDA_COMPILER explicitly.
if (NOT DEFINED CMAKE_CUDA_ARCHITECTURES)
set(CMAKE_CUDA_ARCHITECTURES "75;80;86") # native is supported in version 3.24
endif ()
# Note: This variable is used to initialize the CUDA_ARCHITECTURES property on all targets.
project(Cuda_notes LANGUAGES CUDA CXX C)
@songyuc
songyuc / validate_shuffle_with_reset.py
Last active October 19, 2022 16:23
Got WARNING when using `reset()`.
import nvidia.dali.fn as fn
from nvidia.dali import pipeline_def
from nvidia.dali.plugin.pytorch import DALIGenericIterator
from tqdm import tqdm
@pipeline_def
def coco_pipeline():
coco_root = "/local/COCO"
images, bounding_boxes, labels, image_ids = fn.readers.coco(
@songyuc
songyuc / validate_shuffle_by_autoreset.py
Created October 19, 2022 14:45
Got WARNING with `auto_reset`.
import nvidia.dali.fn as fn
from nvidia.dali import pipeline_def
from nvidia.dali.plugin.pytorch import DALIGenericIterator
from tqdm import tqdm
@pipeline_def
def coco_pipeline():
coco_root = "/local/COCO"
images, bounding_boxes, labels, image_ids = fn.readers.coco(
@songyuc
songyuc / validate_shuffle_by_ids.py
Last active October 19, 2022 14:01
There was a warning from DALI iterator.
import nvidia.dali.fn as fn
from nvidia.dali import pipeline_def
from nvidia.dali.plugin.pytorch import DALIGenericIterator
from tqdm import tqdm
@pipeline_def
def coco_pipeline():
coco_root = "/***/COCO"
images, bounding_boxes, labels, image_ids = fn.readers.coco(