Skip to content

Instantly share code, notes, and snippets.

View harishanand95's full-sized avatar
🪴

Harish Anand harishanand95

🪴
  • USA
View GitHub Profile
@harishanand95
harishanand95 / Stable_Diffusion.md
Last active July 29, 2023 20:08
Stable Diffusion optimized for AMD RDNA2 GPUs using IREE->Vulkan

Stable Diffusion optimized for AMD RDNA2 GPUs using IREE->Vulkan

This guide is meant for developers who want to experiment with the IREE/MLIR toolchain to compile Vulkan code. A more streamlined installation procedure (that uses precompiled .vmfb files optimized for various GPUs) would be possible, but in the interest of time, we’re sharing here instructions meant for developers.

Install the latest AMD Drivers

AMD Software: Adrenalin Edition 22.11.1 for MLIR/IREE Driver Version 22.20.29.09 for Windows® 10 and Windows® 11 (Windows Driver Store Version 31.0.12029.9003)

https://www.amd.com/en/support/kb/release-notes/rn-rad-win-22-11-1-mril-iree

@harishanand95
harishanand95 / Stable_Diffusion.md
Last active June 6, 2024 08:42
Stable Diffusion on AMD GPUs on Windows using DirectML
cmake_minimum_required(VERSION 2.8.3 FATAL_ERROR)
cmake_policy(SET CMP0048 NEW)
cmake_policy(SET CMP0054 NEW)
if (NOT CMAKE_INSTALL_PREFIX)
set(CMAKE_INSTALL_PREFIX "/usr" CACHE STRING "install prefix" FORCE)
endif()
message(STATUS "install-prefix: ${CMAKE_INSTALL_PREFIX}")
@harishanand95
harishanand95 / styles.css
Last active April 6, 2018 12:34
styles.css
html, body {
font-family: 'Roboto', 'Helvetica', sans-serif;
margin: 0;
padding: 0;
}
.mdl-demo .mdl-layout__header-row {
padding-left: 40px;
}
.mdl-demo .mdl-layout.is-small-screen .mdl-layout__header-row h3 {
@harishanand95
harishanand95 / time_conversion.js
Last active May 17, 2016 15:36
A JS version of relative time conversion used in systemd. C version available at systemd/src/basic/time-util.c
/* A JS version of time conversion used in systemd
* Available C version at systemd/src/basic/time-util.c
* Input t = real time microsecond (1463509800000000)
*/
function format_timestamp_relative(t) {
var MSEC_PER_SEC = 1000;
var USEC_PER_SEC = 1000000;
var USEC_PER_MSEC = 1000;
var USEC_INFINITY =-1;