Skip to content

Instantly share code, notes, and snippets.

@fierval
fierval / cuda_check.py
Created June 6, 2022 00:52 — forked from f0k/cuda_check.py
Simple python script to obtain CUDA device information
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Outputs some information on CUDA-enabled devices on your computer,
including current memory usage.
It's a port of https://gist.github.com/f0k/0d6431e3faa60bffc788f8b4daa029b1
from C to Python with ctypes, so it can run without compiling anything. Note
that this is a direct translation with no attempt to make the code Pythonic.
@fierval
fierval / conv.cu
Created March 17, 2021 23:25 — forked from goldsborough/conv.cu
Convolution with cuDNN
#include <cudnn.h>
#include <cassert>
#include <cstdlib>
#include <iostream>
#include <opencv2/opencv.hpp>
#define checkCUDNN(expression) \
{ \
cudnnStatus_t status = (expression); \
if (status != CUDNN_STATUS_SUCCESS) { \
@fierval
fierval / tensorflow_self_check.py
Last active July 28, 2017 06:23 — forked from mrry/tensorflow_self_check.py
TensorFlow on Windows self-check
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
type PushParser<'a> = Parser<'a, unit>
let ws = spaces
let str s = pstring s
let openList : PushParser<string> = str "(" .>> ws
let closeList : PushParser<string> = ws >>. str ")"
let internal pushProgram, internal pushProgramRef = createParserForwardedToRef()