Skip to content

Commit 6a43520

Browse files
committed
feat(ops): add MetaX, Iluvatar, and Moore backends for Cast
1 parent e81256b commit 6a43520

3 files changed

Lines changed: 68 additions & 0 deletions

File tree

src/iluvatar/cast/kernel.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#ifndef INFINI_OPS_ILUVATAR_CAST_KERNEL_H_
2+
#define INFINI_OPS_ILUVATAR_CAST_KERNEL_H_
3+
4+
#include <utility>
5+
6+
#include "cuda/cast/kernel.h"
7+
#include "iluvatar/caster.cuh"
8+
#include "iluvatar/runtime_.h"
9+
10+
namespace infini::ops {
11+
12+
template <>
13+
class Operator<Cast, Device::Type::kIluvatar>
14+
: public CudaCast<Runtime<Device::Type::kIluvatar>> {
15+
public:
16+
using CudaCast<Runtime<Device::Type::kIluvatar>>::CudaCast;
17+
};
18+
19+
} // namespace infini::ops
20+
21+
#endif

src/metax/cast/kernel.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#ifndef INFINI_OPS_METAX_CAST_KERNEL_H_
2+
#define INFINI_OPS_METAX_CAST_KERNEL_H_
3+
4+
#include <utility>
5+
6+
#include "cuda/cast/kernel.h"
7+
#include "metax/caster.cuh"
8+
#include "metax/runtime_.h"
9+
10+
namespace infini::ops {
11+
12+
template <>
13+
class Operator<Cast, Device::Type::kMetax>
14+
: public CudaCast<Runtime<Device::Type::kMetax>> {
15+
public:
16+
using CudaCast<Runtime<Device::Type::kMetax>>::CudaCast;
17+
};
18+
19+
} // namespace infini::ops
20+
21+
#endif

src/moore/cast/kernel.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#ifndef INFINI_OPS_MOORE_CAST_KERNEL_H_
2+
#define INFINI_OPS_MOORE_CAST_KERNEL_H_
3+
4+
#include <utility>
5+
6+
// clang-format off
7+
#include "moore/polyfills.cuh"
8+
// clang-format on
9+
10+
#include "cuda/cast/kernel.h"
11+
#include "moore/caster.cuh"
12+
#include "moore/polyfills.cuh"
13+
#include "moore/runtime_.h"
14+
15+
namespace infini::ops {
16+
17+
template <>
18+
class Operator<Cast, Device::Type::kMoore>
19+
: public CudaCast<Runtime<Device::Type::kMoore>> {
20+
public:
21+
using CudaCast<Runtime<Device::Type::kMoore>>::CudaCast;
22+
};
23+
24+
} // namespace infini::ops
25+
26+
#endif

0 commit comments

Comments
 (0)