This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cmake_minimum_required(VERSION 3.10) | |
| project(cppgen VERSION 0.0.1 LANGUAGES CXX) | |
| set(CMAKE_CXX_STANDARD 11) | |
| set(CMAKE_CXX_STANDARD_REQUIRED ON) | |
| link_libraries(pthread) | |
| add_executable(cppgen cppgen.cc) | |
| add_executable(cppgen-dup2 cppgen-dup2.cc) | |
| add_executable(cppgen-lock cppgen-lock.cc) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| with 0 points | |
| with 160 points | |
| with 60 points | |
| with 140 points | |
| with 64 points | |
| with 52 points | |
| with 84 points | |
| with 146 points | |
| with 52 points | |
| with 76 points |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "skel.h" | |
| #include <torch/extension.h> | |
| namespace py = pybind11; | |
| PYBIND11_MODULE(skel, m) { | |
| py::class_<Skel>(m, "Skel").def(py::init<>()).def("tensor", &Skel::tensor) | |
| /**/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import timeit | |
| import torch | |
| from torch import nn | |
| from torch.nn import functional as F | |
| class Flags: | |
| pass |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copied from | |
| // https://raw.githubusercontent.com/tensorflow/tensorflow/9590c4c32dd4346ea5c35673336f5912c6072bf2/tensorflow/core/platform/default/notification.h | |
| // and slightly modified. | |
| /* 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import select | |
| import sys | |
| import termios | |
| import gym | |
| def play(): | |
| env = gym.make("AdventureNoFrameskip-v4" if len(sys.argv) < 2 else sys.argv[1]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import sys | |
| import tensorflow as tf | |
| logdir = "/tmp/checkpoints" | |
| def get_variables(logdir): | |
| variables = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ==50689== NVPROF is profiling process 50689, command: python simpleembed.py | |
| ==50689== Profiling application: python simpleembed.py | |
| ==50689== Profiling result: | |
| Type Time(%) Time Calls Avg Min Max Name | |
| GPU activities: 57.66% 248.18ms 30 8.2726ms 5.6467ms 13.019ms maxwell_scudnn_128x32_stridedB_splitK_interior_nn | |
| 16.02% 68.946ms 30 2.2982ms 1.0702ms 4.6368ms void calc_bias_diff<int=2, float, float, int=128, int=0>(cudnnTensorStruct, float const *, cudnnTensorStruct, float*, float, float, int) | |
| 4.22% 18.172ms 30 605.73us 2.6240us 945.47us _ZN2at6native18elementwise_kernelILi128ELi4EZNS0_15gpu_kernel_implIZNS0_16copy_kernel_implIffEEvRNS_14TensorIteratorEEUlfE_EEvS5_RKT_EUliE0_EEviT1_ | |
| 3.22% 13.858ms 30 461.94us 100.42us 1.1248ms maxwell_scudnn_128x32_stridedB_small_nn | |
| 3.09% 13.316ms 30 443.88us 113.18us 1.0100ms maxwell_scudnn_128x32_r |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM ubuntu:18.04 | |
| SHELL ["/bin/bash", "-c"] | |
| RUN apt-get update && apt-get install -y \ | |
| python3-setuptools \ | |
| python3-pip \ | |
| git \ | |
| libsm6 \ | |
| libxext6 \ |