Skip to content

Commit

Permalink
[TARGET] Phase out WebGL (apache#5570)
Browse files Browse the repository at this point in the history
The graphics API is moving towards next generation.
Vulkan/Metal on the native and WebGPU on the web.

Due to the limited programming model, we cannot get the best compute performance in WebGL.
Now that the mainline already have both WebGPU and vulkan support, this PR phases out WebGL.
  • Loading branch information
tqchen authored and Trevor Morris committed Jun 9, 2020
1 parent c12a177 commit 0346399
Show file tree
Hide file tree
Showing 14 changed files with 12 additions and 572 deletions.
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ endif()
tvm_option(USE_CUDA "Build with CUDA" OFF)
tvm_option(USE_OPENCL "Build with OpenCL" OFF)
tvm_option(USE_VULKAN "Build with Vulkan" OFF)
tvm_option(USE_OPENGL "Build with OpenGL" OFF)
tvm_option(USE_METAL "Build with Metal" OFF)
tvm_option(USE_ROCM "Build with ROCM" OFF)
tvm_option(ROCM_PATH "The path to rocm" /opt/rocm)
Expand Down Expand Up @@ -322,7 +321,6 @@ include(cmake/modules/VTA.cmake)
include(cmake/modules/CUDA.cmake)
include(cmake/modules/Hexagon.cmake)
include(cmake/modules/OpenCL.cmake)
include(cmake/modules/OpenGL.cmake)
include(cmake/modules/OpenMP.cmake)
include(cmake/modules/Vulkan.cmake)
include(cmake/modules/Metal.cmake)
Expand Down
2 changes: 0 additions & 2 deletions include/tvm/runtime/device_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ inline const char* DeviceName(int type) {
return "vpi";
case kDLROCM:
return "rocm";
case kOpenGL:
return "opengl";
case kDLExtDev:
return "ext_dev";
case kDLWebGPU:
Expand Down
8 changes: 0 additions & 8 deletions include/tvm/te/schedule.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,11 +251,6 @@ class Stage : public ObjectRef {
* \return reference to self.
*/
TVM_DLL Stage& double_buffer(); // NOLINT(*)
/*!
* \brief Schedule for OpenGL fragment shader.
* \return reference to self.
*/
Stage& opengl(); // NOLINT(*)
/*!
* \brief whether the stage has been scheduled.
* \return whether the stage has been scheduled.
Expand Down Expand Up @@ -478,8 +473,6 @@ class StageNode : public Object {
std::string scope;
/*! \brief Whether this is an output stage */
bool is_output{false};
/*! \brief Whether this is an OpenGL stage */
bool is_opengl{false};
/*! \brief Whether apply double buffer optimization to this stage */
bool double_buffer{false};
/*!
Expand All @@ -503,7 +496,6 @@ class StageNode : public Object {
v->Visit("attach_stage", &attach_stage);
v->Visit("scope", &scope);
v->Visit("is_output", &is_output);
v->Visit("is_opengl", &is_opengl);
v->Visit("double_buffer", &double_buffer);
v->Visit("group", &group);
v->Visit("num_child_stages", &num_child_stages);
Expand Down
1 change: 0 additions & 1 deletion include/tvm/tir/expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,6 @@ class CallNode : public PrimExprNode {
static constexpr const char* shift_right = "shift_right";
static constexpr const char* popcount = "popcount";
static constexpr const char* likely = "likely";
static constexpr const char* glsl_texture_store = "glsl_texture_store";
static constexpr const char* prefetch = "prefetch";
static constexpr const char* isnan = "isnan";
static constexpr const char* isfinite = "isfinite";
Expand Down
7 changes: 0 additions & 7 deletions include/tvm/tir/stmt.h
Original file line number Diff line number Diff line change
Expand Up @@ -893,13 +893,6 @@ constexpr const char* channel_write_advance = "channel_write_advance";
constexpr const char* pipeline_stage_scope = "pipeline_stage_scope";
/*! \brief pipeline execution scope, implies the scope can be pipelined. */
constexpr const char* pipeline_exec_scope = "pipeline_exec_scope";
/*!
* \brief Mark that this stage is an OpenGL shader. Since OpenGL shader only
* allows writing out to one element of the output texture, the Provide node
* gets translated to a special Call::glsl_texture_store statement instead of a
* Store statement.
*/
constexpr const char* opengl_stage_scope = "opengl_stage_scope";

/*!
* \brief Mark that it is in the device scope.
Expand Down
2 changes: 0 additions & 2 deletions src/runtime/module.cc
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,6 @@ bool RuntimeEnabled(const std::string& target) {
f_name = "device_api.gpu";
} else if (target == "cl" || target == "opencl" || target == "sdaccel") {
f_name = "device_api.opencl";
} else if (target == "gl" || target == "opengl") {
f_name = "device_api.opengl";
} else if (target == "mtl" || target == "metal") {
f_name = "device_api.metal";
} else if (target == "vulkan") {
Expand Down
37 changes: 0 additions & 37 deletions src/target/opt/build_opengl_off.cc

This file was deleted.

Loading

0 comments on commit 0346399

Please sign in to comment.