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
SRC = main.cpp | |
ARCH = gfx942 | |
INC_DIR = include/ck_tile | |
all: | |
clang++ -fsyntax-only -I$(INC_DIR) -x hip --offload-arch=$(ARCH) $(SRC) |
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 <hip/hiprtc.h> | |
#include <hip/hip_runtime.h> | |
#include <cstdlib> | |
#include <iostream> | |
#include <string> | |
#include <vector> | |
static constexpr const char gpu_program[]{ | |
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
# run packed docker image | |
docker run \ | |
-it \ | |
--privileged \ | |
--group-add sudo \ | |
poyenc/9110-mod:latest | |
# configure CK | |
cd ~/composable_kernel | |
mkdir build && cd build |
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 <array> | |
#include <cassert> | |
#include <chrono> | |
#include <cstdio> | |
#include <iomanip> | |
#include <iostream> | |
#include <iterator> | |
#include <numeric> | |
#include <vector> |
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
// CodeEmitVisitor.h | |
class CodeEmitVisitor : public CustomVisitor<CodeEmitVisitor>, private NvDlaConstants | |
{ | |
public: | |
void visit(const Conv& pConv) override; | |
void visit(Conv& pConv) override; | |
// 1. add visit method for const Add IR | |
void visit(const Add& pOp) override; | |
// 2. add visit method for non-const Add IR, force it calls the previous version |
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
#pragma once [33/1792] | |
#include <algorithm> | |
#include <cstddef> | |
#include <deque> | |
#include <functional> | |
#include <limits> | |
#include <random> | |
#include <type_traits> | |
#include <utility> |
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
#pragma once [27/1718] | |
#include <iterator> | |
#include <memory> | |
#include <type_traits> | |
#include <utility> | |
namespace poyenc { | |
template <typename Iterator, typename Generator> |
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
#pragma once | |
#include <stdexcept> | |
#include <type_traits> | |
#include <utility> | |
namespace poyenc { | |
template <typename IntType = int> | |
class sequence_generator { |
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
#pragma once | |
#include <iterator> | |
#include <type_traits> | |
#include <utility> | |
template <typename RandomAccessRange> | |
class index_iterator { | |
public: | |
using target_type = RandomAccessRange; |
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 <cassert> | |
#include <cstddef> | |
#include <iostream> | |
#include <type_traits> | |
#include <utility> | |
namespace poyenc { | |
namespace mpl { | |
template <typename...> |
NewerOlder